-
Notifications
You must be signed in to change notification settings - Fork 3
feat(filter): migrate plugin #436
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
base: next
Are you sure you want to change the base?
Conversation
bd44e84 to
4640a4e
Compare
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>
4640a4e to
22cd58a
Compare
a9658ca to
9a5d3cf
Compare
9a5d3cf to
2fa72f1
Compare
| /** @internal */ | ||
| configuration, | ||
|
|
||
| /** @internal */ | ||
| state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This two fields shouldn't be internal. They should be marked as @alpha (or stable API).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state seems reasonable, configuration is redundant.
# Conflicts: # package-lock.json # src/core/types/plugin.ts
|
dopenguin
left a comment
There was a problem hiding this 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.
| "types": [ | ||
| "vitest/importMeta", | ||
| "vitest/jsdom", | ||
| "node", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this added here? IIRC it was added on another PR as well.
| * If using `string` instead of `CategoryValue`, the string is interpreted as the `value` key. | ||
| * | ||
| * @remarks | ||
| * The values listed here can be localized: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * The values listed here can be localized: | |
| * The values listed here should be localized: |
If this is not done, one would see e.g. layer.haus.category.houseType.knownValue.shed in the UI.
It also does not seem to be intended, that this is the default value. I suggest falling back to the knownValue for the category if no locale is available.
The same goes for targetProperty.
`
| /** | ||
| * Technical value of a feature property. | ||
| */ | ||
| value: string |
There was a problem hiding this comment.
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.
| @@ -0,0 +1,55 @@ | |||
| <template> | |||
| <PolarCard class="polar-filter-card"> | |||
| <FilterLayerChooser | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not shown (only one layer configured), I'd still expect an information for which layer I am filtering.
| <label class="kern-label" for="select">Fachdatensatz auswählen</label> | ||
| <div class="kern-form-input__select-wrapper"> | ||
| <select v-model="model" class="kern-form-input__select"> | ||
| <option v-for="layer of layers" :key="layer">{{ layer }}</option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather like to see the name that is defined for the layer in configuration.layers like it is done in layerChooser. I doubt someone using POLAR would understand that the layer with the id '6059' is meant to show the reports in HH.
| const layerConfiguration = computed( | ||
| () => filterStore.configuration.layers[props.layer] as FilterConfiguration | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is locally created twice. Would it be intereting to move selectedLayer from FilterUI to the store and then have a getter for layerConfiguration that can be ued in FilterCategory and FilterTime?
| }) | ||
| /* eslint-enable no-empty-pattern */ | ||
|
|
||
| test('Component works as expected', async ({ wrapper, coreStore, store }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "expected"?
| </section> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of this functionality seems overly complex compared to the previous implementation. Can you shed some light onto your thoughtprocess and why you deem this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a function that may of use in other plugins as well.
| /** @internal */ | ||
| configuration, | ||
|
|
||
| /** @internal */ | ||
| state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state seems reasonable, configuration is redundant.
Summary
The filter plugin is migrated to POLAR@3.
Instructions for local reproduction and review
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.
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