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

Add in document title to interactive examples #5561

Closed
schalkneethling opened this issue Mar 10, 2022 · 7 comments · Fixed by #5667
Closed

Add in document title to interactive examples #5561

schalkneethling opened this issue Mar 10, 2022 · 7 comments · Fixed by #5667
Assignees
Labels
♿ a11y An MDN Web Docs accessible by everyone interactive-examples issues related to interactive examples (EmbedInteractiveExample macro) macros tracking issues related to kumascript macros ux make the user experience awesome

Comments

@schalkneethling
Copy link

schalkneethling commented Mar 10, 2022

@dipikabh started a discussion thread here after having talked through it internally. The idea has great support across the content team. I have also mentioned this to @HerminaC and the decision was made to go ahead with the plan.

This means we will add an h2 heading to the output of the interactive example macro. This would then have the additional benefit of it showing up in the table of contents for all pages with an interactive example.

@schalkneethling schalkneethling added ♿ a11y An MDN Web Docs accessible by everyone ux make the user experience awesome labels Mar 10, 2022
@schalkneethling schalkneethling self-assigned this Mar 10, 2022
@schalkneethling schalkneethling moved this from Backlog to In Progress in Yari Platform Engineering Mar 10, 2022
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 10, 2022
@schalkneethling schalkneethling removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 10, 2022
@schalkneethling
Copy link
Author

Try it

Screenshot 2022-03-14 at 19 29 28

Interactive example

Screenshot 2022-03-14 at 19 30 04

Interactive demo

Screenshot 2022-03-14 at 19 30 24

@dipikabh
Copy link
Contributor

Thanks @schalkneethling for the screenshots showing all the possibilities being discussed!

@ddbeck @Rumyra: If we go with the option of "Try it", do we want to add an exclamation mark so that it says "Try it!"?

I noticed that in the JS learning area, we have the section heading "Test your skills!".

@caugner
Copy link
Contributor

caugner commented Mar 15, 2022

Have we considered adding this header directly to all articles in mdn/content, to be consistent with the other headers?

Other macros like CSSInfo and csssyntax don't add a heading either:

https://github.com/mdn/content/blob/468263d78e51ed942e64b47b1bbef5dfbbc689bf/files/en-us/web/css/width/index.md?plain=1#L68-L74

@schalkneethling
Copy link
Author

Have we considered adding this header directly to all articles in mdn/content, to be consistent with the other headers?

That is indeed the plan once we have settled on a title to test with our readers.

@ddbeck
Copy link
Contributor

ddbeck commented Mar 16, 2022

I know it was my idea, but I'm loving the "Try it" header—it feels much more approachable.

@dipikabh

If we go with the option of "Try it", do we want to add an exclamation mark so that it says "Try it!"?

I'm inclined to go without the punctuation. I think the learning area has a breezier tone than the reference docs. I think people bounce from reference page to reference page pretty quickly—the exclamation loses its potency with repetition, I think.

I'm also favorable to trying this out with other macros, but I say we start with just one and see how it goes.

@schalkneethling
Copy link
Author

@ddbeck @dipikabh Shall we go ahead and trial Try it?

@dipikabh
Copy link
Contributor

@ddbeck @dipikabh Shall we go ahead and trial Try it?

We should 👍. Thanks!

@caugner caugner added macros tracking issues related to kumascript macros interactive-examples issues related to interactive examples (EmbedInteractiveExample macro) labels Mar 17, 2022
schalkneethling pushed a commit that referenced this issue Mar 18, 2022
Add the title "Try it" to the EmbedInteractiveExample macro so it shows up in the TOC sidebar.

fix #5561
schalkneethling pushed a commit that referenced this issue Mar 21, 2022
* feat:macros - Add title to EmbedInteractiveExample macro

Add the title "Try it" to the EmbedInteractiveExample macro so it shows up in the TOC sidebar.

fix #5561

* fix kumascript tests
Repository owner moved this from In Progress to Done in Yari Platform Engineering Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿ a11y An MDN Web Docs accessible by everyone interactive-examples issues related to interactive examples (EmbedInteractiveExample macro) macros tracking issues related to kumascript macros ux make the user experience awesome
Projects
4 participants