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

fix(tree): allow single select only and add indicator #9405

Merged
merged 9 commits into from
May 23, 2024

Conversation

josercarcamo
Copy link
Contributor

Related Issue: #7899

Summary

Allowed only single selection and added the selection indicator

@josercarcamo josercarcamo requested a review from a team as a code owner May 23, 2024 19:01
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label May 23, 2024
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

Hey @josercarcamo code changes look 💣 👍

Just had some comments

@@ -201,7 +201,10 @@ export class TreeItem implements ConditionalSlotComponent, InteractiveComponent

render(): VNode {
const rtl = getElementDir(this.el) === "rtl";
const showBulletPoint = this.selectionMode === "single" || this.selectionMode === "children";
Copy link
Member

Choose a reason for hiding this comment

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

Do existing screenshot tests show changes? If not, can we add a screenshot test for he bullet point?

@@ -175,7 +175,8 @@ export class Tree {
(((this.selectionMode === "single" || this.selectionMode === "multiple") &&
childItems.length <= 0) ||
this.selectionMode === "children" ||
this.selectionMode === "multichildren");
this.selectionMode === "multichildren" ||
this.selectionMode === "single-persist");
Copy link
Member

Choose a reason for hiding this comment

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

Should we add an e2e test to account for single-persist allowing to be unselected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@josercarcamo josercarcamo added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label May 23, 2024
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍 💯

@josercarcamo josercarcamo added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 23, 2024
@josercarcamo josercarcamo merged commit 0d07b59 into main May 23, 2024
13 checks passed
@josercarcamo josercarcamo deleted the josercarcamo/7899-single-persist-bugs branch May 23, 2024 22:21
benelan added a commit that referenced this pull request May 24, 2024
…x-constraint

* origin/main: (37 commits)
  build(deps): update dependency @stencil/core to v4.18.2 (#9266)
  refactor(stepper-item): drop unnecessary transitions (#9327)
  docs(contributing): add commit message formatting details (#9389)
  docs: update component READMEs (#9328)
  build: update browserslist db (#9263)
  chore: release next
  fix(tree): allow single select only and add indicator (#9405)
  chore: release next
  feat(split-button): Make dividers consistent (#9402)
  chore: release next
  feat(stepper, stepper-item): add separate change events to stepper and items (deprecates `calciteStepperItemChange` on the parent) (#9351)
  chore(tree): fix multiple selection-mode values set in slotted dropdown-groups (#9378)
  fix(dropdown-group): title scale with dropdown scale (#9360)
  chore: release next
  fix(tree): allow deselection in single selectionMode (#9363)
  chore: Update placeholder images in stories and demos (#9395)
  chore: use local placeholder image in html files (#9392)
  chore: release next
  chore: release hotfix (#9382)
  fix(combobox): fix error that occurs when a click is emitted when the component is appended to the DOM (#9380)
  ...
benelan added a commit that referenced this pull request May 29, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>@esri/calcite-components: 2.9.0</summary>

##
[2.9.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.8.3...@esri/calcite-components@2.9.0)
(2024-05-28)


### Features

* **split-button:** Make dividers consistent
([#9402](#9402))
([caf27e3](caf27e3))
* **stepper, stepper-item:** Add separate change events to stepper and
items (deprecates `calciteStepperItemChange` on the parent)
([#9351](#9351))
([cf6a118](cf6a118))


### Bug Fixes

* **dropdown-group:** Title scale with dropdown scale
([#9360](#9360))
([3529cdd](3529cdd))
* **input-date-picker, date-picker:** Ensure min/max can be unset
([#9406](#9406))
([89b0bfe](89b0bfe))
* **tree:** Allow deselection in single selectionMode
([#9363](#9363))
([cb6ef73](cb6ef73))
* **tree:** Allow single select only and add indicator
([#9405](#9405))
([0d07b59](0d07b59))
</details>

<details><summary>@esri/calcite-components-angular: 2.9.0</summary>

##
[2.9.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.8.3...@esri/calcite-components-angular@2.9.0)
(2024-05-28)


### Miscellaneous Chores

* **@esri/calcite-components-angular:** Synchronize components versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from ^2.9.0-next.23 to ^2.9.0
</details>

<details><summary>@esri/calcite-components-react: 2.9.0</summary>

##
[2.9.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.8.3...@esri/calcite-components-react@2.9.0)
(2024-05-28)


### Miscellaneous Chores

* **@esri/calcite-components-react:** Synchronize components versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from ^2.9.0-next.23 to ^2.9.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <no-reply@benelan.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants