Skip to content

Leverage Lit controllers #11305

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

Open
3 of 14 tasks
jcfranco opened this issue Jan 15, 2025 · 1 comment
Open
3 of 14 tasks

Leverage Lit controllers #11305

jcfranco opened this issue Jan 15, 2025 · 1 comment
Labels
0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.

Comments

@jcfranco
Copy link
Member

jcfranco commented Jan 15, 2025

Description

Lit controllers are a powerful and useful feature that we can start leveraging to streamline code and promote reusability. The following are potential candidates that could be refactored to follow this pattern:

Proposed Advantages

Leaner code, simpler code reuse pattern.

Which Component

Modules listed above.

Relevant Info

Note: controllers testing should use Vitest browser mode

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components
@jcfranco jcfranco added 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked. labels Jan 15, 2025
jcfranco added a commit that referenced this issue Jan 17, 2025
**Related Issue:** #11305

## Summary

This deprecates loadable helpers to allow for incremental migration.
After #10310, `componentOnReady` is available for both lazy and
non-lazy-loading outputs, so we can replace our custom utils that
previously worked around Stencil’s inconsistency.
benelan pushed a commit that referenced this issue Feb 8, 2025
**Related Issue:** #11305

## Summary

This deprecates loadable helpers to allow for incremental migration.
After #10310, `componentOnReady` is available for both lazy and
non-lazy-loading outputs, so we can replace our custom utils that
previously worked around Stencil’s inconsistency.
@eriklharper
Copy link
Contributor

Putting a note in here to remind us to look at this. The idea is that we can create a Controller to handle value setting functionality, such as ensuring that change events only fire when a) the user interacts with the form component resulting in b) the value actually changing from the prior emitted value. This controller would be able to differentiate between direct value changes made from code, such as on hostConnected or as the result of another property changing that affects the value.

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. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

2 participants