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

Refactor: simplify stories #1114

Open
2 of 34 tasks
jcfranco opened this issue Oct 12, 2020 · 10 comments
Open
2 of 34 tasks

Refactor: simplify stories #1114

jcfranco opened this issue Oct 12, 2020 · 10 comments
Assignees
Labels
1 - assigned Issues that are assigned to a sprint and a team member. docs Issues relating to documentation updates only. help wanted Issues that the core team needs help with in a sprint. p - low Issue is non core or affecting less that 10% of people using the library refactor Issues tied to code that needs to be significantly reworked.
Milestone

Comments

@jcfranco
Copy link
Member

jcfranco commented Oct 12, 2020

Stories could be simplified by adopting a pattern used in calcite-app-components. This pattern consists of:

  1. adding a helper to build common attributes (e.g., https://github.com/Esri/calcite-components/blob/master/src/components/calcite-block/calcite-block.stories.ts#L19-L140)
  2. sharing ☝ across all stories (see https://github.com/Esri/calcite-components/blob/master/src/components/calcite-block/calcite-block.stories.ts#L142-L167)
  3. Having a 'basic' story with all default attributes available, and then adding specific configurations for unique use cases.

Each component stories should be tackled separately to streamline the refactoring. The following will need to be updated:

  • calcite-accordion.stories.ts
  • calcite-alert.stories.ts
  • calcite-button.stories.ts
  • calcite-card.stories.ts
  • calcite-checkbox.stories.ts
  • calcite-chip.stories.ts
  • calcite-color.stories.ts
  • calcite-combobox.stories.ts
  • calcite-date.stories.ts
  • calcite-dropdown.stories.ts
  • calcite-icon.stories.ts
  • calcite-input.stories.ts
  • calcite-label.stories.ts
  • calcite-link.stories.ts
  • calcite-loader.stories.ts
  • calcite-modal.stories.ts
  • calcite-notice.stories.ts
  • calcite-pagination.stories.ts
  • calcite-popover.stories.ts
  • calcite-progress.stories.ts
  • calcite-radio-button-group.stories.ts
  • calcite-radio-button.stories.ts
  • calcite-radio-group.stories.ts
  • calcite-scrim.stories.ts
  • calcite-slider.stories.ts
  • calcite-split-button.stories.ts
  • calcite-stepper.stories.ts
  • calcite-switch.stories.ts
  • calcite-tabs.stories.ts
  • calcite-tile-select-group.stories.ts
  • calcite-tile-select.stories.ts
  • calcite-tile.stories.ts
  • calcite-tooltip.stories.ts
  • calcite-tree.stories.ts

Assigning to backlog since this may take a few iterations to complete.

Additional Info

#1424 should help with this

@jcfranco jcfranco added help wanted Issues that the core team needs help with in a sprint. docs Issues relating to documentation updates only. refactor Issues tied to code that needs to be significantly reworked. labels Oct 12, 2020
@jcfranco jcfranco added this to the Backlog milestone Oct 12, 2020
@jcfranco jcfranco self-assigned this Oct 12, 2020
@jcfranco jcfranco added the p - low Issue is non core or affecting less that 10% of people using the library label Oct 12, 2020
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Nov 20, 2020
@macandcheese
Copy link
Contributor

Still valid, combined with global props for dir, scale, theme this will be a great improvement.

@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Nov 21, 2020
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Feb 16, 2021
@github-actions
Copy link
Contributor

This issue has been automatically closed due to inactivity.

@jcfranco jcfranco reopened this Feb 26, 2021
@jcfranco jcfranco removed the Stale Issues or pull requests that have not had recent activity. label Feb 26, 2021
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Mar 29, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2021

This issue has been automatically closed due to inactivity.

@github-actions github-actions bot closed this as completed Apr 5, 2021
@jcfranco jcfranco reopened this Apr 5, 2021
@jcfranco jcfranco added 1 - assigned Issues that are assigned to a sprint and a team member. and removed Stale Issues or pull requests that have not had recent activity. labels Apr 5, 2021
@benelan
Copy link
Member

benelan commented Oct 26, 2021

@eriklharper is this still valid after the story changes?

@eriklharper
Copy link
Contributor

@eriklharper is this still valid after the story changes?

Yes, this is still valid. You can still use the patterns this issue describes alongside the Screener Steps API. Checkout calcite-action.stories.ts to see that in action.

@benelan
Copy link
Member

benelan commented Oct 26, 2021

Would this pattern benefit from being added to the conventions? And then when reviewing PRs that contain story changes we can point to the convention and get it cleaned up bit by bit.

@eriklharper
Copy link
Contributor

Would this pattern benefit from being added to the conventions? And then when reviewing PRs that contain story changes we can point to the convention and get it cleaned up bit by bit.

It would in fact! Excellent idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - assigned Issues that are assigned to a sprint and a team member. docs Issues relating to documentation updates only. help wanted Issues that the core team needs help with in a sprint. p - low Issue is non core or affecting less that 10% of people using the library refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

5 participants