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

[#8752] Add kiezradar filter options on project overview #6057

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

sevfurneaux
Copy link
Collaborator

@sevfurneaux sevfurneaux commented Feb 8, 2025

Describe your changes
This PR adds kiezradars as filter options on the project overview.

2025-02-20 11 36 35

Tasks

  • PR name contains story or task reference
  • Steps to recreate and test the changes
  • Documentation (docs and inline)
  • Tests (including n+1 and django_assert_num_queries where applicable)
  • Changelog

@sevfurneaux sevfurneaux self-assigned this Feb 8, 2025
@sevfurneaux sevfurneaux force-pushed the sf-2025-02-kiezradar-dropdown branch from 2f158e8 to 3db626f Compare February 8, 2025 07:03
@sevfurneaux sevfurneaux changed the title [WIP] [#8752] Add kiezradar filter options on project overview WIP: [#8752] Add kiezradar filter options on project overview Feb 8, 2025
@vellip vellip force-pushed the sf-2025-02-kiezradar-dropdown branch from a186345 to e32c5ae Compare February 18, 2025 08:41
@sevfurneaux sevfurneaux force-pushed the sf-2025-02-kiezradar-dropdown branch from e4b8698 to 5460fac Compare February 19, 2025 12:23
@sevfurneaux sevfurneaux changed the title WIP: [#8752] Add kiezradar filter options on project overview [#8752] Add kiezradar filter options on project overview Feb 19, 2025
@sevfurneaux sevfurneaux force-pushed the sf-2025-02-kiezradar-dropdown branch 5 times, most recently from 74c1082 to c68a986 Compare February 20, 2025 11:43
import { classNames } from 'adhocracy4'
import useCombobox from 'adhocracy4/adhocracy4/static/forms/useCombobox'

export const GroupMultiSelect = ({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your help with the multiselect, @hom3mad3. It was quite different from the existing MultiSelect component, so created a new GroupMultiSelect component.

@sevfurneaux sevfurneaux force-pushed the sf-2025-02-kiezradar-dropdown branch from c68a986 to a59a173 Compare February 20, 2025 11:48
Copy link
Contributor

@hom3mad3 hom3mad3 left a comment

Choose a reason for hiding this comment

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

✨ Looks good, thank you 🫶🏼

@sevfurneaux sevfurneaux force-pushed the sf-2025-02-kiezradar-dropdown branch from 09dfe84 to ca598d7 Compare February 21, 2025 08:39
Copy link
Collaborator

@vellip vellip left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the work! Just one remark

Comment on lines 49 to 68
<ul className="a4-combo-box__group-dropdown">
{choices.map((choice) => {
const { active, focused, ...attrs } = getChoicesAttr(choice)
const liClasses = classNames(
liClassName,
'a4-combo-box__option',
active && 'a4-combo-box__option--active',
focused && 'a4-combo-box__option--focus'
)

return (
<li key={choice.value} className={liClasses} {...attrs}>
<span>{choice.name}</span>
{active && (
<i className="bicon bicon-check" aria-hidden="true" />
)}
</li>
)
})}
</ul>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This generates an empty list if there are no items. Can you wrap it in an if?

Copy link
Contributor

Choose a reason for hiding this comment

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

@vellip thanks for finding this...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, this is now changed 👍

@sevfurneaux sevfurneaux force-pushed the sf-2025-02-kiezradar-dropdown branch from ca598d7 to 17c263a Compare February 21, 2025 16:07
@sevfurneaux sevfurneaux merged commit 7737a3d into dev Feb 21, 2025
2 checks passed
@sevfurneaux sevfurneaux deleted the sf-2025-02-kiezradar-dropdown branch February 21, 2025 16:18
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.

3 participants