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

embrace CSS #3019

Merged
merged 3 commits into from
Jul 7, 2023
Merged

embrace CSS #3019

merged 3 commits into from
Jul 7, 2023

Conversation

louis-bompart
Copy link
Collaborator

No description provided.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Pull Request Report

PR Title

❌ Title should follow the conventional commit spec:

(optional scope):

Example:

feat(headless): add result-list controller

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 179.7 179.7 0
search 336.7 336.7 0
insight 291.7 291.7 0
product-listing 280.9 280.9 0
product-recommendation 154.6 154.6 0
recommendation 190 190 0

@@ -123,40 +123,6 @@ export class AtomicInsightResult {
.join('');
}

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good refacto 🙏 , magic ✨
but one only thing, deleting this selectors make the css global and not only when we have result actions implemented and on hover. for example the hover on each result changes color all the time even if we have no result action to show. I personnaly don't find it disturbing to be global, what do you think ?

case on hover with no result action:

Screenshot 2023-07-07 at 11 40 11 AM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, missed it.
Yeah, I think having global is fine too. Maybe validate with the rest of the gang?

If that's a no-go, right now there's no way to do it in CSS only (we need the :has pseudo-selector for that, and Firefox does not support it yet). I would then put a CSS class on the host element "hasResultAction" and a TODO to refactor when Firefox supports it).

https://developer.mozilla.org/en-US/docs/Web/CSS/:has

@louis-bompart
Copy link
Collaborator Author

@jelmedini I think it's preferable for the position attribute to be as consistent as possible.
So I added cd21616

@louis-bompart louis-bompart requested a review from jelmedini July 7, 2023 18:48
Copy link
Contributor

@jelmedini jelmedini left a comment

Choose a reason for hiding this comment

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

@louis-bompart just checked, and actually the effect inside SFINT is like this, we have a color change on hover. I also validated with the UX this change. so we are good to keep the background color hover in general :)

@louis-bompart
Copy link
Collaborator Author

@louis-bompart just checked, and actually the effect inside SFINT is like this, we have a color change on hover. I also validated with the UX this change. so we are good to keep the background color hover in general :)

👍 feel free to merge this PR into yours :)

@jelmedini jelmedini merged commit cb38ca3 into feature/SVCC-2942-result-actions Jul 7, 2023
@jelmedini jelmedini deleted the SVCC-2942-css-powa branch July 7, 2023 20:00
jelmedini added a commit that referenced this pull request Jul 10, 2023
* feat(atomic): add result action bar on hover

* feat(atomic): change action bar css

* feat(atomic): change result background color

* feat(atomic): change action bar marging

* feat(atomic): change to tailwind classes and small refacto

* feat(atomic): update css to not change parent element css

* feat(atomic): change prop name and update typo

* feat(atomic): add css color variable

* feat(atomic): remove important from css

* feat(atomic): add extra padding for first element

* embrace CSS (#3019)

* use CSS for hover

* handle first with CSS

* always relative

---------

Co-authored-by: Louis Bompart <[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.

2 participants