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

x goes away when the tab count is 1 and never comes back #10183

Open
2 of 7 tasks
gayukumar opened this issue Aug 29, 2024 · 12 comments
Open
2 of 7 tasks

x goes away when the tab count is 1 and never comes back #10183

gayukumar opened this issue Aug 29, 2024 · 12 comments
Assignees
Labels
2 - in development Issues that are actively being worked on. ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@gayukumar
Copy link

gayukumar commented Aug 29, 2024

Check existing issues

Actual Behavior

  • Open multiple tabs which are closable
  • close all of them
  • see the last one doesnt have close anymore
  • and it does not come back when add the tab programmitically again
  • also, if only one tab closable is appended this will have close button

Expected Behavior

The 'x' should always remain beside the tab name, regardless of if other tabs are deleted
OR

  • the 'x' should return as soon as there are >1 tabs

Reproduction Sample

https://devtopia.esri.com/WebGIS/arcgis-web-analysis/issues/6994

Reproduction Steps

  • Open multiple tabs which are closable
  • close all of them
  • see the last one doesnt have close anymore
  • and it does not come back when add the tab programmitically again
  • also, if only one tab closable is appended this will have close button

Reproduction Version

https://devtopia.esri.com/WebGIS/arcgis-web-analysis/issues/6994

Relevant Info

happens on any browser or any OS

Regression?

No response

Priority impact

impact - p2 - want for an upcoming milestone

Impact

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Web Analysis

@gayukumar gayukumar added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Aug 29, 2024
@github-actions github-actions bot added ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Aug 29, 2024
@geospatialem geospatialem added enhancement Issues tied to a new feature or request. p - medium Issue is non core or affecting less that 60% of people using the library estimate - 3 A day or two of work, likely requires updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Sep 3, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Sep 6, 2024
@nel11211
Copy link

@geospatialem
Is there any way to bump this issue for R3? See discussion here.

@geospatialem
Copy link
Member

Is there any way to bump this issue for R3? See discussion here.

@nel11211 Responded in the internal thread for follow-up to re-assess the priority, if needed. 🤜🏻🤛🏻

@josercarcamo
Copy link
Contributor

@geospatialem could the "Expected Behavior" section please be reduced to only one expectation, not an "or'?

@geospatialem
Copy link
Member

@geospatialem could the "Expected Behavior" section please be reduced to only one expectation, not an "or'?

@josercarcamo I'm not sure what the ask is WRT the expected behavior, but either expectation should work for the solution. cc @jcfranco

@jcfranco
Copy link
Member

jcfranco commented Feb 5, 2025

Either seem fine to me, but will defer to @ashetland and @SkyeSeitz on this since this might need some design UXpertise™.

@josercarcamo If you have any thoughts on the implementation details we should consider for each approach, please share.

@gayukumar
Copy link
Author

Either of the solution is fine. but rite now the behavior is inconsistent

@ashetland
Copy link
Contributor

I think we should categorize this as a bug instead of an enhancement and move forward with:

the 'x' should return as soon as there are >1 tabs

@josercarcamo josercarcamo self-assigned this Feb 5, 2025
@geospatialem geospatialem added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. and removed enhancement Issues tied to a new feature or request. labels Feb 6, 2025
@josercarcamo
Copy link
Contributor

All, so each tab can be configured to be "closable". It is not by default. So, the "x" should be displayed on the first tab when there are more than one tabs and the first tab was originally closable, correct?

@jcfranco
Copy link
Member

jcfranco commented Feb 6, 2025

Based on the recent updates, I think this is what we need:

  • for all closable tabs
    • if there's exactly one closable tab remaining, hide its closable affordance and prevent closing
    • if there's more than one closable tab, display its closable affordance

I don't recall if mixing closable and non-closable tabs is a supported use case. @ashetland @Elijbet Do you remember?

@ashetland
Copy link
Contributor

recall if mixing closable and non-closable tabs is a supported use case

I don't recall, unfortunately.

  • for all closable tabs
    • if there's exactly one closable tab remaining, hide its closable affordance and prevent closing
    • if there's more than one closable tab, display its closable affordance

Agreed.

@josercarcamo
Copy link
Contributor

At the moment, the "closable" property is on the tab-title, so with this HTML:

Image

It is possible to mix closable and non-closable tabs as seen here:

Image

We probably should move the "closable" property to the tab-nav if we don't want to allow any mixing.

@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Feb 6, 2025
@josercarcamo josercarcamo added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Feb 7, 2025
@jcfranco
Copy link
Member

Yeah, the doc site's Tabs sample also subtly showcases the mixed case (i.e., closable is configurable on a single tab only).

We probably should move the "closable" property to the tab-nav if we don't want to allow any mixing.

We can revisit this once we have more feedback on closable use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - in development Issues that are actively being worked on. ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

7 participants