Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple code previews #16

Open
tylersticka opened this issue Dec 10, 2019 · 4 comments
Open

Multiple code previews #16

tylersticka opened this issue Dec 10, 2019 · 4 comments
Assignees
Labels
✨ enhancement New feature or request

Comments

@tylersticka
Copy link
Member

It would be great to be able to view multiple code samples where appropriate.

Screen Shot 2019-12-10 at 2 40 10 PM

Some use cases:

  • The pattern is shared on the server and may be included via simplified template code (rather than plain HTML).
  • The pattern is a JavaScript component or has accompanying JavaScript.
  • The pattern depends on a complex data structure best represented via an accompanying bit of sample JSON.
@Paul-Hebert
Copy link
Contributor

💯

@Paul-Hebert Paul-Hebert added the ✨ enhancement New feature or request label Dec 10, 2019
@Paul-Hebert Paul-Hebert self-assigned this Jan 17, 2020
@Paul-Hebert
Copy link
Contributor

Heydon Pickering provides guidance for creating tabbed interfaces which could be helpful here.

He also discusses when it's appropriate to use accordions instead of tabs. This may be worth considering. I think it would feel less streamlined, but allow users to view multiple code previews at once.

@Paul-Hebert
Copy link
Contributor

Scott O'hara also has a library for accessible tabs

It's also worth considering more of a codepen like experience, where code previews are shown side by side.

@Paul-Hebert
Copy link
Contributor

Another useful article: https://tink.uk/using-tabbed-interfaces-with-a-screen-reader/

I want to spend a little time thinking through the ideal UX before diving into the dev implementation here. The screenshot you shared is how we've done this in the past, and seems tab-like, but I wonder if it:

  1. Is the best UX for this task
  2. Is different enough from tabs that some of the tab keyboard behaviors would be confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants