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

Surface glossary terms and related links in expandable cards #6305

Merged
merged 19 commits into from
Feb 21, 2025

Conversation

parlough
Copy link
Member

@parlough parlough commented Jan 5, 2025

Introduces a new card-based design for entries on the glossary page. The short description is shown by default and the long description and resource links are shown once expanded. When navigating to the page, the card that corresponds to the current fragment (such as #variance in dart.dev/resources/glossary#variance) is expanded.

Additionally you can specify the type of a resource to add an icon in front of the resource button. Currently the supported types are:

  • term (for other glossary entries or word definitions)
  • article or doc (general for doc pages)
  • tutorial (for tutorials, codelabs, etc.)
  • api (for API links)
  • video (for videos, such as links to Youtube videos)
  • code or sample (for code samples or repository links)
  • diagnostic or lint (for links to specific lints, diagnostic docs, etc.)

To implement this, I've introduced a new set of shared button styles in _buttons.scss and updated the shared set of card styles in _cards.scss. That way cards across the site (currently this and the linter rules page) can benefit from a consistent structure and shared styles.

Staged affected docs:

@dart-github-bot
Copy link
Collaborator

dart-github-bot commented Jan 5, 2025

Visit the preview URL for this PR (updated for commit 23f632c):

https://dart-dev--pr6305-misc-glossary-cards-eefxhuts.web.app

@parlough parlough force-pushed the misc/glossary-cards branch from 1226e67 to 3e1c989 Compare January 5, 2025 13:48
@parlough parlough changed the title [WIP] Begin glossary card exploration Surface glossary terms and related links in expandable cards Feb 21, 2025
@parlough parlough marked this pull request as ready for review February 21, 2025 20:42
Copy link
Contributor

@MaryaBelanger MaryaBelanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so cool 🥹 The resource icons are so thoughtful.

I dont see how the lint pages are affected, is there no visible change?

Either way, looks amazing, thank you so much.

@parlough
Copy link
Member Author

I don't see how the lint pages are affected, is there no visible change?

Then that's good. They shouldn't be visually affected, but they use the new shared styles.

@parlough parlough merged commit 9cbff30 into main Feb 21, 2025
10 checks passed
@parlough parlough deleted the misc/glossary-cards branch February 21, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants