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

Experimental tile: code implementation #12464

Closed
5 tasks done
Tracked by #12278
tay1orjones opened this issue Nov 2, 2022 · 2 comments · Fixed by #12711
Closed
5 tasks done
Tracked by #12278

Experimental tile: code implementation #12464

tay1orjones opened this issue Nov 2, 2022 · 2 comments · Fixed by #12711
Assignees
Labels
adopter: PAL Work-stream that directly helps a Pattern & Asset Library. role: dev 🤖
Milestone

Comments

@tay1orjones
Copy link
Member

tay1orjones commented Nov 2, 2022

This issue is for the primary implementation of the new experimental tile variant.

At it's core, the required changes are likely just styling placed behind a new classname/selector.

There's a few ideas on the "toggle mechanism" we could use to allow consumers to flip on the new styling:

  • via a new hasImprovedContrast (naming tbd) prop on Tile
  • Through a whole new component exports, unstable__Tile, unstable__SelectableTile, etc.
  • via a context wrapper component (feature flag) - this would enable certain sections of an app's tiles to use the new variant
  • Add a new sass feature flag, off by default

Really it depends on feedback we get:

  • Is individual opt-in important?
    • A: No
  • Is opting-in to an entire section (all?) of an app more desirable?
    • A: Yes
  • Is it allowable from a design-consistency standpoint to split the design and have portions of the same app using both tile designs at the same time?
    • A: No - we do not want old and new styling mixed in an application. It should be one or the other.

#12464 (comment)

@tay1orjones tay1orjones changed the title Experimental tile: code implementation Experimental tile: code implementation Nov 2, 2022
@tay1orjones tay1orjones changed the title Experimental tile: code implementation Experimental tile: code implementation Nov 2, 2022
@tay1orjones tay1orjones moved this to ⏱ Backlog in Design System Nov 2, 2022
@tay1orjones
Copy link
Member Author

We talked about this today 11/3 at design crit:

  • We do not need to facilitate piecemeal adoption.
    • In fact we want the opposite - an entire app should switch over to using the new tile styling all at once.
  • From a design consistency standpoint, we do not want consumers mixing the old and new tile styling within the same app.

Based on this, I skew towards some type of global feature flag (maybe just in sass?) that consumers can turn on at one place to apply to their entire app.

Adding a prop or a new unstable export are not desirable approaches because they both would mean that we need to write a codemod to facilitate quick conversion so migration isn't a long process.

@tay1orjones tay1orjones added this to the 2022 Q4 milestone Nov 3, 2022
@tay1orjones
Copy link
Member Author

For the storybook, we'll likely have to ship additional styles scoped to a specific story. Something like this:

// tile-story-styles.scss

@use '@carbon/react/scss/components/tile` with (
  $experimental-improved-tile-contrast: true
);

.scope-to-custom-class {
  @include tile.tile();
}

@sstrubberg sstrubberg added the adopter: PAL Work-stream that directly helps a Pattern & Asset Library. label Nov 16, 2022
@alisonjoseph alisonjoseph moved this from ⏱ Backlog to 🚦 In Review in Design System Nov 22, 2022
@alisonjoseph alisonjoseph moved this from 🚦 In Review to 🏗 In Progress in Design System Nov 22, 2022
@alisonjoseph alisonjoseph moved this from 🏗 In Progress to 🚦 In Review in Design System Dec 5, 2022
@kodiakhq kodiakhq bot closed this as completed in #12711 Dec 8, 2022
kodiakhq bot added a commit that referenced this issue Dec 8, 2022
* feat(tile): add experimental improved contrast tile

closes #12464

* Update ExperimentalTile.stories.js

* feat(tile): update feature flag and story

* feat(tile): add experimental tile feature flag docs

* feat(tile): add improved contrast to vrt

* chore: move improved tile to experimental section in storybook

* chore: docs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Repository owner moved this from 🚦 In Review to ✅ Done in Design System Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopter: PAL Work-stream that directly helps a Pattern & Asset Library. role: dev 🤖
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants