Skip to content

feat(filter): migrate plugin#436

Open
oeninghe-dataport wants to merge 41 commits intonextfrom
vue3/migrate-plugin-filter
Open

feat(filter): migrate plugin#436
oeninghe-dataport wants to merge 41 commits intonextfrom
vue3/migrate-plugin-filter

Conversation

@oeninghe-dataport
Copy link
Collaborator

@oeninghe-dataport oeninghe-dataport commented Jan 2, 2026

Summary

The filter plugin is migrated to POLAR@3.

Instructions for local reproduction and review

  • Open snowbox.
  • Enable the layer "Anliegen (MML)" and move the map to Hamburg, Germany.
  • Use the filters and test them.

Additional hints

Layout flaws

The layout of the filter dialog is somehow broken.
It is larger than the map's height (in the snowbox).
You may scroll it, but you cannot see the bottom of the scrollbar, as it overflows.

This, however, is, as far as I can tell, not a filter-specific problem but located probably in iconMenu.
Therefore, it is not considered here.

Fixed with #493

Styling

The general styling for this component is inspired by some (deprecated) UI/UX drafts.

Date range picker

The date range picker consists of two browser-native date pickers.
This control is supported by all major browsers (https://caniuse.com/input-datetime).

This improvised date range picker already supports limiting the dates (up to or starting with today's date).
An advanced implementation (as before with Vuetify) is left open to another PR.

Relevant tickets, issues, et cetera

Closes #370

@oeninghe-dataport oeninghe-dataport added this to the POLAR@3 milestone Jan 2, 2026
@oeninghe-dataport oeninghe-dataport self-assigned this Jan 2, 2026
@oeninghe-dataport oeninghe-dataport added the refactor Refactoring of previous code label Jan 2, 2026
@oeninghe-dataport oeninghe-dataport linked an issue Jan 2, 2026 that may be closed by this pull request
@oeninghe-dataport oeninghe-dataport force-pushed the vue3/migrate-plugin-filter branch from bd44e84 to 4640a4e Compare January 2, 2026 13:02
dependabot bot and others added 2 commits January 5, 2026 17:07
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 20.2.0 to 20.3.0.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v20.3.0/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-version: 20.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@oeninghe-dataport oeninghe-dataport force-pushed the vue3/migrate-plugin-filter branch from 4640a4e to 22cd58a Compare January 5, 2026 16:09
@oeninghe-dataport oeninghe-dataport force-pushed the vue3/migrate-plugin-filter branch 2 times, most recently from a9658ca to 9a5d3cf Compare January 7, 2026 15:33
@oeninghe-dataport oeninghe-dataport force-pushed the vue3/migrate-plugin-filter branch from 9a5d3cf to 2fa72f1 Compare January 7, 2026 15:38
@oeninghe-dataport oeninghe-dataport marked this pull request as ready for review January 7, 2026 15:45
@dopenguin dopenguin removed the request for review from warm-coolguy January 19, 2026 10:33
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

PR Preview Action v1.8.0

QR code for preview link

🚀 View preview at
https://Dataport.github.io/polar/pr-preview/pr-436/

Built to branch gh-pages at 2026-02-16 17:35 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Member

@dopenguin dopenguin left a comment

Choose a reason for hiding this comment

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

  • I can't seem to be able to tab through the selection of the buttons. Please take a look at this. This probably results from the <input>s being hidden and only the labels being displayed. Not sure how a ScreenReader would interpret them as well. Maybe using an actual button here seems reasonable?
  • Selecting a BlockButton makes it jiggle a bit, which is annoying. This should be fixable by reserving some space for the border.
  • Implement the old UI for layout: 'nineRegions'. As we didn't have a final draft yet, the previous layout should be available.

I've also attached a patch which adds the pointer-events to the correct elements.

🏓 @oeninghe-dataport

/**
* Technical value of a feature property.
*/
value: string
Copy link
Member

Choose a reason for hiding this comment

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

It seems fitting to also allow multiple values here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This type describes a single entry (checkbox) for a category. As far as I understand the POLAR@2 documentation on this (and the requirements spec), this should be a single value.

Why would you allow multiple values here? Is the intention to group multiple values to a single option?

Copy link
Member

Choose a reason for hiding this comment

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

knownValues previously was of type string[], so we didn't have this situation yet.

It seemed fitting to be able to group multiple known values as a single option to reduce e.g. an almost endless list. This is not essential though 🎩

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@oeninghe-dataport
Copy link
Collaborator Author

oeninghe-dataport commented Feb 3, 2026

I've also attached a patch which adds the pointer-events to the correct elements.

I cannot access that file...feel free to commit it directly on the branch.
@dopenguin

@oeninghe-dataport
Copy link
Collaborator Author

  • Selecting a BlockButton makes it jiggle a bit, which is annoying. This should be fixable by reserving some space for the border.

20d3c31

@oeninghe-dataport
Copy link
Collaborator Author

  • I can't seem to be able to tab through the selection of the buttons. Please take a look at this. This probably results from the <input>s being hidden and only the labels being displayed. Not sure how a ScreenReader would interpret them as well. Maybe using an actual button here seems reasonable?

ac723a0

@oeninghe-dataport
Copy link
Collaborator Author

  • Implement the old UI for layout: 'nineRegions'. As we didn't have a final draft yet, the previous layout should be available.

Old UI = visible checkboxes and radio buttons?
Or is there anything else that should differ to the current layout?

@oeninghe-dataport
Copy link
Collaborator Author

🏓 @dopenguin

Copy link
Member

@dopenguin dopenguin left a comment

Choose a reason for hiding this comment

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

}

function getLayerConfiguration(layerId: string) {
const polar = configuration.value.layers.find(
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't mapConfiguration be more precise?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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


/**
* Returns the layer configuration or `null` if the layer was not found.
* The configuration is merged from the service register and the POLAR `layers` configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Linking {@link createMap | serviceRegister parameter of createMap} and MapConfiguration.layers seems reasonable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines 27 to 29
.polar-filter-card {
pointer-events: all;
padding-bottom: 3em;
}
Copy link
Member

Choose a reason for hiding this comment

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

Not needed. Just makes the whole card focusable as well.
Don't forget to remove the class on the card as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if (!polar || !register) {
return null
}
return { ...register, ...polar }
Copy link
Member

Choose a reason for hiding this comment

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

The return should have some other type than any

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines 36 to 41
watch(selectedLayerId, (newLayerId) => {
if (newLayerId === null || state.value[newLayerId]) {
return
}
state.value[newLayerId] = {}
})
Copy link
Member

Choose a reason for hiding this comment

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

Could this be done on setup instead? Or is there a reason behind doing this "lazily"? It would also ease the type for selectedLayerState

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@oeninghe-dataport
Copy link
Collaborator Author

🏓 @dopenguin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of previous code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration of Filter plugin to POLAR@3

2 participants