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

Expose dotcom shared components #557

Merged
merged 12 commits into from
Sep 1, 2023
Merged

Expose dotcom shared components #557

merged 12 commits into from
Sep 1, 2023

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Aug 11, 2023

Partially addresses https://github.com/github/primer/issues/2310

This PR adds the list of shared React components from dotcom:

A screenshot of a page on primer.style showing a list of component name links grouped alphabetically by first letter. Two components are listed: ItemPicker and ListView. An icon to the right of each component indicates clicking on the link will open a new tab/window. A label next to the icon says 'draft.'

The list of shared components comes from a build artifact in dotcom CI. It is downloaded by primer/design's CI and used to populate the list on primer.style.

Note that not all components in dotcom have corresponding stories. For those components that do not have stories, the links navigate to the component's source code on github.com.

Last thing of note: we wanted the shared components to appear in search results. I accomplished this by making a change to the doctocat template that allows adding arbitrary data to the search corpus. Each shared component needs to have its own URL for this to work. I've added redirects for each of these faux pages that takes you back to the list of shared components.

@camertron camertron temporarily deployed to github-pages August 11, 2023 22:48 — with GitHub Actions Inactive
@camertron camertron marked this pull request as ready for review August 11, 2023 22:59
@camertron camertron requested a review from a team as a code owner August 11, 2023 22:59
@camertron camertron temporarily deployed to github-pages August 15, 2023 16:02 — with GitHub Actions Inactive
@emilybrick
Copy link
Contributor

Waiting for Rachel's feedback on this, but maybe we add some kind of messaging under the header to let the public know they can't access these links:
Screenshot 2023-08-15 at 12 21 47 PM

@emilybrick
Copy link
Contributor

Sharing some feedback from @dipree, who is working on organizing the internal Storybook for these components, and the concept of Recipes 👇

Explanation from the docs of how recipes fit in:

  • Primer Components - Design System Components are shared, content-agnostic, and context-agnostic built for maximal reuse. These components leverage Primer Primitives and have a very high standard. Primer has contribution guidelines to help achieve this level of quality.
  • Primer Recipes - Recipe components are mainly compositions of design system components that are to be used consistently in GitHub. Most often, they are not agnostic enough to live in the design system therefore, they are not public on primer.style. Sometimes they can become a Primer component. Recipes can be created by any team at GitHub and are maintained by the team that created them.
  • One-offs - In rare cases, one-off components are needed for very specific use cases. But for the most part, creating them should be avoided. Custom solutions can be great but run the risk of causing an inconsistent user experience leading to customer friction.

Right now, the Shared components list displayed in this PR align most closely with the One-offs described in the bullets above ☝️

From @dipree:

I would say we only surface Recipes and Recipes [Draft] in Primer. The rest is considered “experimental”.

To see an example of Recipes in the storybook (WIP): https://github.com/github/github/pull/283177

/cc @camertron @mperrotti

@camertron
Copy link
Contributor Author

@emilybrick cool, thanks for the recipes context. Should we make it clear the shared components we're linking to are experimental then, or only list recipes? I think there are only like 2 recipes at the moment.

@lesliecdubs
Copy link
Member

@camertron let's see what Emily says as well, but think the updated direction here would be to only expose Recipes in the Primer docs, and not list the experiments at all. We're in early stages of Recipes so it's okay if there's only those first 2 to start.

@camertron camertron temporarily deployed to github-pages August 28, 2023 22:36 — with GitHub Actions Inactive
@camertron camertron temporarily deployed to github-pages August 29, 2023 19:13 — with GitHub Actions Inactive
@camertron camertron temporarily deployed to github-pages August 31, 2023 22:09 — with GitHub Actions Inactive
@camertron camertron temporarily deployed to github-pages August 31, 2023 22:19 — with GitHub Actions Inactive
Copy link
Contributor

@emilybrick emilybrick left a comment

Choose a reason for hiding this comment

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

Thank you for updating this so quickly!

Two comments/questions but overall this LGTM

  • I don't think we need the alphabetical headings at this point, since there are only two components - could just be bulleted list?
  • do we need to say these are "recipes" anywhere? /cc @lesliecdubs @dipree I'm fine calling them components as its a bit more straightforward and introducing the recipe concept on the public site might not be necessary.

@lesliecdubs
Copy link
Member

do we need to say these are "recipes" anywhere? /cc @lesliecdubs @dipree I'm fine calling them components as its a bit more straightforward and introducing the recipe concept on the public site might not be necessary.

My two cents: I do think using the term “recipe” would be helpful for Hubbers to make the connection. That said, I’m in favor of adding/explaining the recipe concept on this page in an iteration once Daniel is back so we can go ahead and get this addition out in the meantime.

@camertron camertron merged commit f22d3b1 into main Sep 1, 2023
4 checks passed
@camertron camertron deleted the shared_components branch September 1, 2023 20:26
mperrotti pushed a commit that referenced this pull request Sep 29, 2023
* Expose dotcom shared components

* Update content/github-staff/github-shared-components.mdx

Co-authored-by: Emily Brick <[email protected]>

* Change format of shared_components.json

* Renaming

* Fix link styles; rearrange shared components page

* Stop using outdated shared deploy config

* Add ListView component to fallback recipe file

* Pull data from github master branch

* Remove unnecessary console.log; remove unused ToC item

* D'oh, fix other ToC link

* Stop grouping shared components alphabetically

---------

Co-authored-by: Emily Brick <[email protected]>
mperrotti added a commit that referenced this pull request Oct 5, 2023
* rough first draft

* adds images and formats do/dont examples to rough draft

* checkpoint for misc content edits, added section for navigation

* reformats and adds to degraded content info, adds button flowchart

* adds and updates content, applies some layout

* reworked title

* adds page to nav, rms error messages stub file

* adds guidance about error states to empty states guidelines

* adds info about forms and data loss confusion

* adds rough draft of navigation degradation and loading guidelines

* rm commented text that was being unintentionally rendered

* revises navigation guidance for individual nav items (example: right-hand global side sheet that appears when clicking avatar in global nav header)

* basic content outline

* adds more specific guidance about sidesheet degradation, adjusts some image dimensions

* some refinements to content and structure

* adds graphics and applies some layout

* adds a11y guidance

* tweaks to formatting and content

* adds loading pg to nav

* misc edits and refinements

* addresses PR feedback, removes guidance that sometimes it's ok to disable a button

* fixes typo

* adds screen recording to demonstrate an inert button, and other edits

* appease the linter

* appease the linter (second attempt)

* adds more info about button loading state a11y

* tweaks and typo corrections

* fix button loading state section's layout

* image and video improvements

* updates button loading guidance to align with parallel work

* small typo fix

* content improvements

* image tweak

* image tweak

* updates from merging degraded experience docs

* appease the linter

* rough first draft

* adds images and formats do/dont examples to rough draft

* checkpoint for misc content edits, added section for navigation

* reformats and adds to degraded content info, adds button flowchart

* adds and updates content, applies some layout

* reworked title

* adds page to nav, rms error messages stub file

* adds guidance about error states to empty states guidelines

* adds info about forms and data loss confusion

* adds rough draft of navigation degradation and loading guidelines

* rm commented text that was being unintentionally rendered

* revises navigation guidance for individual nav items (example: right-hand global side sheet that appears when clicking avatar in global nav header)

* adds more specific guidance about sidesheet degradation, adjusts some image dimensions

* basic content outline

* some refinements to content and structure

* adds graphics and applies some layout

* adds a11y guidance

* tweaks to formatting and content

* adds loading pg to nav

* adds more info about button loading state a11y

* Fix broken link on filter input docs (#581)

* Component page breadcrumbs (#569)

* fix for breadcrumbs withPrefix

* bumped version

* yarn.lock

* editing component layout to include breadcrumbs

* fixes component pg breadcrumb nav

---------

Co-authored-by: Mike Perrotti <[email protected]>

* Expose dotcom shared components (#557)

* Expose dotcom shared components

* Update content/github-staff/github-shared-components.mdx

Co-authored-by: Emily Brick <[email protected]>

* Change format of shared_components.json

* Renaming

* Fix link styles; rearrange shared components page

* Stop using outdated shared deploy config

* Add ListView component to fallback recipe file

* Pull data from github master branch

* Remove unnecessary console.log; remove unused ToC item

* D'oh, fix other ToC link

* Stop grouping shared components alphabetically

---------

Co-authored-by: Emily Brick <[email protected]>

* Icon design guidelines missing images (#585)

* Add nested dialog policy (#583)

* Add nested dialog policy

* Update dialog.mdx

* Update content/components/dialog.mdx

* Update content/components/dialog.mdx

Co-authored-by: Owen Niblock <[email protected]>

* Update dialog.mdx

---------

Co-authored-by: Owen Niblock <[email protected]>

* Add accessibility GitHub issues link to component documentation (#573)

* add an accessibility permalink

* testing out two a11y sections

* added component and imported into component layout

* modified component layout

* added accessibility component into tooltip file

* fixed component

* individually importing the accessibility link component into docs pages

* added accessibility link component to components a-f

* added a11y component to the rest of component pages

* updated contribution guides to reflect these changes

* fixed linter

* fixed linter...again

* added consistent headings

* Update content/guides/contribute/documentation.mdx

Co-authored-by: Josep Martins <[email protected]>

* Update content/components/tooltip.mdx

* updated accessibility component

* updated Link to match link in footer

---------

Co-authored-by: Josep Martins <[email protected]>

* Update README.md (#586)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* typo fix and adding project board link (#587)

* Add info about required css loading (#588)

* Add info about required css loading

* Review fixes

* Fix markdown linter (#589)

* Primer Design data visualization guidance (#591)

* Adding light documentation for chart guidance

* update nav and rename for consistency

* misc edits and refinements

* addresses PR feedback, removes guidance that sometimes it's ok to disable a button

* fixes typo

* adds screen recording to demonstrate an inert button, and other edits

* appease the linter

* appease the linter (second attempt)

* tweaks and typo corrections

* fix button loading state section's layout

* Only show highest-ranking status for Rails components on status page (#592)

* image and video improvements

* updates button loading guidance to align with parallel work

* small typo fix

* Replace broken link with the working one (#593)

* Replace broken link with the working one

* Fix as per comments

* Fix 'require' in Rails setup docs (#603)

* Add Primer::Beta::NavList as a valid railsId (#607)

* Lookbook embeds (#608)

* Native Lookbook embeds

* Add more panels; fix URLs

* Fix prod URLs

* Fix dev embed URLs; add inspect button

* content improvements

* image tweak

* Graceful degradation guidelines (#548)

* rough first draft

* adds images and formats do/dont examples to rough draft

* checkpoint for misc content edits, added section for navigation

* reformats and adds to degraded content info, adds button flowchart

* adds and updates content, applies some layout

* reworked title

* adds page to nav, rms error messages stub file

* adds guidance about error states to empty states guidelines

* adds info about forms and data loss confusion

* adds rough draft of navigation degradation and loading guidelines

* rm commented text that was being unintentionally rendered

* revises navigation guidance for individual nav items (example: right-hand global side sheet that appears when clicking avatar in global nav header)

* adds more specific guidance about sidesheet degradation, adjusts some image dimensions

* misc edits and refinements

* addresses PR feedback, removes guidance that sometimes it's ok to disable a button

* fixes typo

* adds screen recording to demonstrate an inert button, and other edits

* appease the linter

* appease the linter (second attempt)

* tweaks and typo corrections

* image and video improvements

* content improvements

* image tweak

* misc image updates

* updates from merging degraded experience docs

* appease the linter

* Update content/ui-patterns/loading.mdx

Co-authored-by: Katie Langerman <[email protected]>

* Update content/ui-patterns/loading.mdx

Co-authored-by: Katie Langerman <[email protected]>

* Update content/ui-patterns/loading.mdx

Co-authored-by: Katie Langerman <[email protected]>

* addresses PR feedback

* appease the linter

* updates interstitial loading screen recording

---------

Co-authored-by: Emily Brick <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
Co-authored-by: Josep Martins <[email protected]>
Co-authored-by: Kate Higa <[email protected]>
Co-authored-by: Owen Niblock <[email protected]>
Co-authored-by: Daniil Kachur <[email protected]>
Co-authored-by: Tyler Benning <[email protected]>
Co-authored-by: Katie Langerman <[email protected]>
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.

4 participants