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

Split Button: FAB slot placement in Firefox and Safari browsers #5743

Open
geospatialem opened this issue Nov 14, 2022 · 12 comments
Open

Split Button: FAB slot placement in Firefox and Safari browsers #5743

geospatialem opened this issue Nov 14, 2022 · 12 comments
Labels
0 - new New issues that need assignment. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. blocked This issue is blocked by another issue. browser-firefox Issues tied to the last 2 versions of Firefox browser. browser-safari Issues tied to the last 2 versions of Safari browser. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. has workaround Issues have a workaround available in the meantime. p - low Issue is non core or affecting less that 10% of people using the library
Milestone

Comments

@geospatialem
Copy link
Member

geospatialem commented Nov 14, 2022

Actual Behavior

When slotting dropdown-items into a split-button's fab slot some browsers (Firefox and Safari) are placing the component underneath parent components, even if using overlay-positioning="fixed".

actual behavior

Expected Behavior

The fab slot should perform similar to the experience in Chrome/Edge and to the footer-actions slot where any slotted child components are depicted with the highest z-index.

expected behavior

Reproduction Sample

https://codepen.io/geospatialem/pen/xxzrJpO

Reproduction Steps

  1. Open the sample in Firefox or Safari
    • In some cases, try to resize the browser to a smaller width and height
  2. Select the "Add" Split button drop-down
  3. Observe the dropdown-items placement underneath the calcite-flow-item

Reproduction Version

beta.98

Relevant Info

Browsers effected:

  • Windows and Mac - Firefox
  • Mac - Safari

Regression?

No response

Impact

The Map Viewer team needs to use the fab slot to maintain design functionality, in particular with the "Layers" panel, so users have the ability to add layers to the map.

fab slot

fab slot screenshot

footer slot

footer slot screenshot

Esri team

ArcGIS Map Viewer

@geospatialem geospatialem added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. browser-safari Issues tied to the last 2 versions of Safari browser. browser-firefox Issues tied to the last 2 versions of Firefox browser. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. labels Nov 14, 2022
@driskull
Copy link
Member

driskull commented Nov 15, 2022

This seems to be a FF bug. It seems like they don't handle a fixed element inside an element positioned as sticky. The fab slot is positioned sticky to stay in the same place when scrolled. Seems like they won't fix it.

https://bugzilla.mozilla.org/show_bug.cgi?id=1514291
https://bugzilla.mozilla.org/show_bug.cgi?id=1452006

Unrelated question, is it valid for slotting a calcite-split-button inside a panel with the fab slot? Seems like our fab slot says...

* @slot fab - A slot for adding a `calcite-fab` (floating action button) to perform an action.

So isn't this not even a valid thing to do? Either that or our doc needs to be more specific on what is allowed.

@driskull
Copy link
Member

If we are going to allow other things slotted in the fab slot, maybe we can rename the slot and update the doc?

Maybe the slot could be named to reflect that whatever slotted will positioned stuck at the bottom.

@geospatialem
Copy link
Member Author

Unrelated question, is it valid for slotting a calcite-split-button inside a panel with the fab slot? Seems like our fab slot says...

@slot fab - A slot for adding a `calcite-fab` (floating action button) to perform an action.

Was wondering this as well, but the use case seemed to be a bit different than the footer-actions slot, so maybe speaks to your next comment on the slot rename.

If we are going to allow other things slotted in the fab slot, maybe we can rename the slot and update the doc?

This could be a good path forward, since the slot has different benefits/uses than the footer-actions slot.

@driskull
Copy link
Member

I'll defer to @jcfranco but as it stands the doc really says that only a fab is allowed in that slot so this issue is "technically" invalid :)

@geospatialem geospatialem added the has workaround Issues have a workaround available in the meantime. label Nov 28, 2022
@geospatialem
Copy link
Member Author

There is a workaround using the footer slot, which mitigates the issue:

<calcite-split-button overlay-positioning="fixed" primary-text="Add" appearance="outline" primary-icon-start="layers" slot="footer">

Reached out to the Map Viewer team to determine if the workaround fits the need, or determine the use case for the fab slot prior to closing or issue prioritization post 1.0.

@geospatialem
Copy link
Member Author

Will review once PR #6520 has been incorporated to review the above issue.

@geospatialem geospatialem added blocked This issue is blocked by another issue. and removed needs triage Planning workflow - pending design/dev review. labels Feb 28, 2023
@geospatialem geospatialem added this to the Stalled milestone Feb 28, 2023
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. 0 - new New issues that need assignment. p - low Issue is non core or affecting less that 10% of people using the library and removed 0 - new New issues that need assignment. 4 - verified Issues that have been released and confirmed resolved. labels May 1, 2023
@geospatialem
Copy link
Member Author

Still occurring in Firefox in 1.3.1 - Codepen has been updated.

From the MV team:

Not high priority since its occurring in Firefox, but definitely something they would like fixing. Moving to the upcoming R03 release.

@geospatialem
Copy link
Member Author

Via Chris and @rebollin:

This would seem a common pattern for how apps would put together these components (layer list + browse / some action)...maybe forgetting something but it would seem odd to drive that from the footer (even though MV already in spots like the basemap gallery.

@rebollin
Copy link

Hi @geospatialem! What is the likelihood of getting this fix in for R03?

@driskull
Copy link
Member

@geospatialem @jcfranco Maybe we could have a different slot that doesn't position sticky but just always places at the bottom absolutely?

@jcfranco
Copy link
Member

jcfranco commented Jul 19, 2023

I'm not sure adding an absolutely-positioned slot is the way to go since its contents would scroll.

As Matt said, this is a Firefox bug (found a couple more), which limits our options. There are some additional workarounds for this:

  • The split button can be absolutely-positioned within the default content slot via @macandcheese
  • Setting overlay-positioning=absolute (default) will prevent clipping by positioning within the panel, but it might not be ideal depending on the width of the dropdown-groups/items and panel.

WRT the fab slot doc, we could leave as is or revisit it to be a bit more generic. We have some slots that are designed with a specific component in mind, so YMMV when deviating.

@jcfranco
Copy link
Member

FWIW, I also submitted a Webkit bug based on one of the FF issues.

@geospatialem geospatialem modified the milestones: Stalled , Freezer Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. blocked This issue is blocked by another issue. browser-firefox Issues tied to the last 2 versions of Firefox browser. browser-safari Issues tied to the last 2 versions of Safari browser. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. has workaround Issues have a workaround available in the meantime. p - low Issue is non core or affecting less that 10% of people using the library
Projects
None yet
Development

No branches or pull requests

5 participants