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

Create map-link.disabled for templated, stylesheet link control API #1019

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

prushforth
Copy link
Member

@prushforth prushforth commented Dec 10, 2024

Closes #1020

Co-authored by @yushan-mu

@prushforth prushforth force-pushed the link-disabled branch 2 times, most recently from cbd611f to bdd54ae Compare December 12, 2024 14:17
- Rename map-link._validateDisabled() to map-link.isVisible()

- Add short circuit check for this.disabled in map-link.isVisible
- Add map-link.disabled as criteria for whenReady() to resolve for rel=
  tile,image,features,query.

- Add await to call to _createTemplatedLink which was missing, possibly
  causing lack of rendering when invoking map-link.enable().

- Do map-link.getLayerEl()._validateDisabled() after enable/disable of
  link - updates layer control if applicable

- Refactor connectedCallback to consolidate stylesheet code into
  _createStylesheetLink method.  Update whenReady criteria for both types
  of stylesheet link.

- Ensure that protomaps stylesheet link selected by templated link is not
  prior disabled

- Add tests for map-link.disabled for rel=tile,image,features,query
- Update layer so that disabled query links aren't queryable
- Add css, class values for test restaurants

- Add waitForTimeout(500) to de-flake the tests

- fixed test i headful mode

- Update map-extent to ignore disabled links for bounds calculations
- Update tests to include logic for initially-disabled templated link

- Replace waitForTimeout(500) with { sloMo: 500 }
@prushforth prushforth marked this pull request as ready for review December 12, 2024 16:19
@prushforth prushforth merged commit 178acd9 into Maps4HTML:main Dec 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement <map-link disabled> boolean attribute
1 participant