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

Feat(web): Introduce Placement dictionary and use it in Dropdown and Tooltip #DS-923 #1092

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

adamkudrna
Copy link
Contributor

Description

  • Introduce Placement dictionary
  • Use it in Dropdown and Tooltip components

Additional context

image

Issue reference

https://jira.lmc.cz/browse/DS-923

@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for spirit-design-system-demo ready!

Name Link
🔨 Latest commit 1382252
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-demo/deploys/652e91554b0c7300083a2c9f
😎 Deploy Preview https://deploy-preview-1092--spirit-design-system-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for spirit-design-system-validations canceled.

Name Link
🔨 Latest commit 1382252
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-validations/deploys/652e9155c760360009003ab6

@github-actions github-actions bot added the feature New feature or request label Oct 10, 2023
@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for spirit-design-system-storybook ready!

Name Link
🔨 Latest commit 1382252
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-storybook/deploys/652e9155c4f0a90008911c7c
😎 Deploy Preview https://deploy-preview-1092--spirit-design-system-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for spirit-design-system-react ready!

Name Link
🔨 Latest commit 1382252
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-react/deploys/652e9155c2d9d80008d7779f
😎 Deploy Preview https://deploy-preview-1092--spirit-design-system-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2023

Coverage Status

coverage: 70.053% (-0.9%) from 70.949% when pulling 37f9b5f on feature/web-placement-dictionary into 2094a04 on main.

@literat literat requested a review from ondrej-kaspar October 11, 2023 09:21
@literat
Copy link
Collaborator

literat commented Oct 11, 2023

I have written a few suggestions, but nothing blocking. It is looking good. Thanks a lot for your effort, it looks like a really complicated task. 👏

@literat
Copy link
Collaborator

literat commented Oct 11, 2023

I have a question about generating the placements. It is necessary to have placement for each component generated? What about to make it like Tooltip Placement--topLeft? Is this even possible? Or why do we go with the way of generating classes when it adds some extra code that may or may not be used? Thanks.

Copy link
Member

@crishpeen crishpeen left a comment

Choose a reason for hiding this comment

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

🤕

@adamkudrna
Copy link
Contributor Author

I have a question about generating the placements. It is necessary to have placement for each component generated? What about to make it like Tooltip Placement--topLeft? Is this even possible? Or why do we go with the way of generating classes when it adds some extra code that may or may not be used? Thanks.

That could be a next level of abstraction. We already abstract things like .text-truncate or .animation-spin-clockwise (we call it "helpers", or "helper classes"), but nothing as complex as the placement logic. Moreover, there is the arrow element which would require something like .placement-top-left > .placement-arrow.

But the idea seems very interesting to me. It's a Tailwind-like tear-down: find what's common, abstract, reuse. Something between design tokens and components.

cc @crishpeen

@adamkudrna adamkudrna force-pushed the feature/web-placement-dictionary branch from 37f9b5f to 1382252 Compare October 17, 2023 13:51
@adamkudrna adamkudrna merged commit 3cd80e6 into main Oct 17, 2023
25 checks passed
@adamkudrna adamkudrna deleted the feature/web-placement-dictionary branch October 17, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants