-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix(quantic): Sort dropdown and tooltip partially hidden by Salesforce container #4028
Conversation
Pull Request Report PR Title ❌ Title should follow the conventional commit spec: (optional scope): Example: feat(headless): add result-list controller Bundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : buildInteractiveInstantResult search : buildInteractiveRecentResult search : buildInteractiveCitation search : buildGeneratedAnswer recommendation : missing SSR support product-recommendation : missing SSR support product-listing : missing SSR support case-assist : missing SSR support insight : missing SSR support commerce : missing SSR support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solutions 1 and 2 look good to me, however I disagree with solution 3.
I don't think we should change the behaviour/design of the tooltip because of a padding issue, I would qualify this as a minor issue that I think we could easily find ways around it without making significant changes in our components.
In the Quantic components, one of the goals is to create components that have the same look and feel as native Salesforce components.
Thus, when building/modifying Quantic components our reference is the SLDS design system and not Atomic.
In the SLDS design system, the tooltip is presented as the following: https://www.lightningdesignsystem.com/components/tooltips/
We should not get far from the tooltip behaviour inside Salesforce by removing the arrow.
packages/quantic/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.css
Outdated
Show resolved
Hide resolved
Pull Request ReportPR Title❌ Title should follow the conventional commit spec: Example: Live demo linksBundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : buildInteractiveInstantResult search : buildInteractiveRecentResult search : buildInteractiveCitation search : buildGeneratedAnswer recommendation : missing SSR support product-recommendation : missing SSR support product-listing : missing SSR support case-assist : missing SSR support insight : missing SSR support commerce : missing SSR support |
@@ -10,7 +10,7 @@ | |||
<lightning-formatted-text value={labels.sortBy}></lightning-formatted-text> | |||
</lightning-layout-item> | |||
<lightning-layout-item> | |||
<lightning-combobox name="sort" value={value} variant="label-hidden" label={labels.sortBy} placeholder={labels.relevancy} options={options} onchange={handleChange}> | |||
<lightning-combobox class="sort__combobox" name="sort" value={value} variant="label-hidden" label={labels.sortBy} placeholder={labels.relevancy} options={options} onchange={handleChange}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how is this CSS class is overriding the Salesforce CSS class defined inside the lightning-combobox component since this class you are adding is in a higher level than the SF class. are you sure it is overriding it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In another note I suggest trying the following solution to see if it works:
The lightning-combobox
component has a public property called: dropdown-alignment
it specifies where the drop-down list is aligned. One of the values that this property could take is auto
which will let the component determine where to open the list based on space available.
So it's worth trying to see if this component by it self is able to adapt according to the SF boundaries.
ref: https://developer.salesforce.com/docs/component-library/bundle/lightning-combobox/specification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Yes I checked it is overriding it.
-
I already tried that when I was experimenting with the potential idea to make it dynamically aligned-right and auto doesnt work :( It was still overflowing... I think it might not account properly for the side of the container or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I would suggested replacing simply the dropdown-alignment
to set it to dropdown-alignment="right"
It makes more sense that the dropdown fits by being right aligned instead of limiting the width etc.
packages/quantic/force-app/main/translations/fr.translation-meta.xml
Outdated
Show resolved
Hide resolved
packages/quantic/force-app/main/translations/fr.translation-meta.xml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing that's hiding the overflow btw is the .hosted-search-page_layout[c-hostedSearchPageRenderer_hostedSearchPageRenderer]
This is the class that has the overflow: hidden
on it, so I don't know why we can't just change that?
@@ -10,7 +10,7 @@ | |||
<lightning-formatted-text value={labels.sortBy}></lightning-formatted-text> | |||
</lightning-layout-item> | |||
<lightning-layout-item> | |||
<lightning-combobox name="sort" value={value} variant="label-hidden" label={labels.sortBy} placeholder={labels.relevancy} options={options} onchange={handleChange}> | |||
<lightning-combobox class="sort__combobox" name="sort" value={value} variant="label-hidden" label={labels.sortBy} placeholder={labels.relevancy} options={options} onchange={handleChange}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I would suggested replacing simply the dropdown-alignment
to set it to dropdown-alignment="right"
It makes more sense that the dropdown fits by being right aligned instead of limiting the width etc.
@@ -1409,14 +1413,14 @@ | |||
</labels> | |||
<labels> | |||
<fullName>quantic_GeneratedAnswerOn</fullName> | |||
<value>Generated answer ON</value> | |||
<value>ON</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't change the values just because they'd fit better xD
Also please don't run prettier on this file it looks stupid to have text on multiple lines.
SFINT-5552
ISSUE 1: Sort component
Before:
After:
Solution:
lightning-combobox
had the class:slds-dropdown_fluid
automatically added by Salesforce which was adding the following properties:min-width 12rem
,max-width: 100%
andwidth: 100%
which was causing the dropdown to overflow on the container.sort__combobox
which overrides the properties set byslds-dropdown_fluid
. I could not just remove the min-width, because then the labels would be truncated.ISSUE 2: Toggle for GEN AI
Before:
After:
Solution:
copy
is also small enough to not get hidden when we do remove the toggle.ISSUE 3: Tooltips getting partially hidden on the top
Will be fixed in a seperate PR in the C4SF package