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

Respect hidden attribute added by end users on components #8623

Open
2 of 6 tasks
driskull opened this issue Jan 18, 2024 · 3 comments
Open
2 of 6 tasks

Respect hidden attribute added by end users on components #8623

driskull opened this issue Jan 18, 2024 · 3 comments
Assignees
Labels
2 - in development Issues that are actively being worked on. 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 p2 - want for current milestone User set priority status of p2 - want for current milestone

Comments

@driskull
Copy link
Member

driskull commented Jan 18, 2024

Check existing issues

Actual Behavior

Some components toggle the hidden attribute which will override any user set hidden attribute on a component.

Expected Behavior

User added hidden attributes are respected on a component

Reproduction Sample

N/A Multiple components affected

Reproduction Steps

  1. See following components usage below

Reproduction Version

2.2.0

Relevant Info

Blocked issues: #8623

src/components/combobox/combobox.tsx:
  1041          const hidden = !find(item, filteredData);
  1042:         item.hidden = hidden;
  1043          const [parent, grandparent] = item.ancestors;

  1045          if (find(parent, filteredData) || find(grandparent, filteredData)) {
  1046:           item.hidden = false;
  1047          }

  1049          if (!hidden) {
  1050:           item.ancestors.forEach((ancestor) => (ancestor.hidden = false));
  1051          }

src/components/flow/flow.tsx:
  164          itemNode.showBackButton = itemNode === activeItem && newItemCount > 1;
  165:         itemNode.hidden = itemNode !== activeItem;
  166        });

src/components/stepper/stepper.tsx:
  412          if (index !== activePosition) {
  413:           item.hidden = true;
  414          } else {
  415:           item.hidden = false;
  416            item.multipleViewMode = false;

  426        this.items.forEach((item: HTMLCalciteStepperItemElement) => {
  427:         item.hidden = false;
  428          item.multipleViewMode = true;

src/components/table/table.tsx:
  355        const inView = rowPos >= this.pageStartRow && rowPos < this.pageStartRow + this.pageSize;
  356:       row.hidden = this.pageSize > 0 && !inView && !this.footRows.includes(row);
  357        row.lastVisibleRow =

src/components/tip-manager/tip-manager.tsx:
  201        tip.selected = isSelected;
  202:       tip.hidden = !isSelected;
  203      });

Regression?

No response

Priority impact

p2 - want for current 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

N/A

@driskull driskull added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Jan 18, 2024
@github-actions github-actions bot added 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 Jan 18, 2024
@jcfranco jcfranco added 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. p - medium Issue is non core or affecting less that 60% of people using the library and removed needs triage Planning workflow - pending design/dev review. labels Feb 29, 2024
@jcfranco
Copy link
Member

Per our triage session, this can be converted into an epic if we need to split up component updates.

@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Apr 3, 2024
@josercarcamo josercarcamo self-assigned this May 8, 2024
@josercarcamo
Copy link
Contributor

josercarcamo commented May 8, 2024

For combobox.tsx, would the following be the correct logic when the hidden attribute is applied, regardless of the combobox logic to display/hide elements?

image

In other words, if the ancestor of an item has the "hidden" attribute, then the item is also hidden.

@josercarcamo josercarcamo added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels May 8, 2024
@driskull
Copy link
Member Author

In other words, if the ancestor of an item has the "hidden" attribute, then the item is also hidden.

Yes, that is correct.

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. 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 p2 - want for current milestone User set priority status of p2 - want for current milestone
Projects
None yet
Development

No branches or pull requests

4 participants