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

Extract some reusable sample components and refactor Dialog examples #169

Merged
merged 4 commits into from
Aug 11, 2021

Conversation

lyzadanger
Copy link
Contributor

@lyzadanger lyzadanger commented Aug 10, 2021

This PR extracts some components (JSX as HTML markup, basically) into a separate samples module to keep from over-cluttering pattern-library page modules, and to make things a little more reusable. It also refactors all of the examples on the Dialog Components pattern-library page, which is a standing issue: #148
I removed one example on the Dialog page that didn't add a whole lot of value in a Pattern-library context.

I did this now because this stuff was starting to tangle me up as I work on Table-related work (including the need to have an example or two of Tables constrained by Dialogs).

I did this quickly so as not drag out the current line of work (toward Table component) more than is necessary. We could make the new samples module of components more elegant, or rename it, or whatever, as we go. And the updated Dialog examples could be DRYed out. Being pragmatic here.

You can see updated pages by running your local webserver and viewing them in the pattern library.

Fixes #148

Keep this markup from cluttering pattern page modules and make it
reusable.
Copy link
Contributor

@esanzgar esanzgar left a comment

Choose a reason for hiding this comment

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

👏🏼

src/pattern-library/components/patterns/samples.js Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #169 (99f304c) into main (73494ad) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #169   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          149       149           
  Branches        51        51           
=========================================
  Hits           149       149           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73494ad...99f304c. Read the comment docs.

@lyzadanger lyzadanger merged commit 6733407 into main Aug 11, 2021
@lyzadanger lyzadanger deleted the pattern-fixtures branch August 11, 2021 12:53
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.

Refactor Dialog/Modal component examples
2 participants