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

[#8769] Kiezradar: Allow creation and editing of kiezradars #5993

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

sevfurneaux
Copy link
Collaborator

@sevfurneaux sevfurneaux commented Jan 28, 2025

Describe your changes
This PR adds the kiezradar filter list, new and editing pages.

2025-01-28 10 14 27

2025-01-28 10 15 34

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 Jan 28, 2025
@sevfurneaux sevfurneaux force-pushed the sf-2025-add-kiezradar-list-new-edit-views branch from 65cfb2c to b76a97f Compare January 28, 2025 10:13
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.

Thanks for the first part of that story! Great work, I just left a few remarks where you might want to have a second look.

meinberlin/react/kiezradar/Kiezradars.jsx Outdated Show resolved Hide resolved
meinberlin/react/kiezradar/Kiezradars.jsx Show resolved Hide resolved
meinberlin/react/kiezradar/Loading.jsx Show resolved Hide resolved
meinberlin/react/kiezradar/KiezradarList.jsx Show resolved Hide resolved
meinberlin/react/kiezradar/KiezradarList.jsx Outdated Show resolved Hide resolved
meinberlin/react/kiezradar/KiezradarList.jsx Outdated Show resolved Hide resolved
meinberlin/react/kiezradar/Kiezradar.jsx Outdated Show resolved Hide resolved

export default function Loading () {
return (
<div className="kiezradars__loading" aria-label={loading}>
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think we need aria-live or some way to hand live status here? @vellip your thoughts?

Copy link
Collaborator Author

@sevfurneaux sevfurneaux Jan 28, 2025

Choose a reason for hiding this comment

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

@hom3mad3 I added aria-live="polite", what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

aria-live should exist at the top level, not the loading indicator. It only announces when descendants change so putting it on a loading indicator will not announce any change as it will just always be the same text. You will want to...

  • set the innermost dom node around dynamic content in a component that does fetching to aria-live="polite"
return (
  <>
    <h1>Title</h1>
    <p>Text</p>
    <div aria-live="polite">
      {data.length && (
        <ul>
          {data.map(i => <li>{i}</li>)}
        </ul>
      )}
    </div>
  </>
)
  • have a loading indicator within the live-region
  • have that loading indicator not be inserted on first render (because a live-region only announces changes to the DOM)
  • instead have it be rendered in once you start the fetching in the useEffect (basically, initialise isLoading with false and call setIsLoading in the useEffect when fetching)

Copy link
Contributor

Choose a reason for hiding this comment

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

@vellip thank you for the explanation, i learned a lot ❤️

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 @vellip, this is now updated 👍

@sevfurneaux sevfurneaux force-pushed the sf-2025-add-kiezradar-list-new-edit-views branch from 3971adb to 165af47 Compare January 28, 2025 16:14
@sevfurneaux sevfurneaux force-pushed the sf-2025-add-kiezradar-list-new-edit-views branch 2 times, most recently from d105888 to 4006f63 Compare January 29, 2025 09:52
@sevfurneaux sevfurneaux force-pushed the sf-2025-add-kiezradar-list-new-edit-views branch from 4006f63 to 871a062 Compare January 29, 2025 10:05
@sevfurneaux
Copy link
Collaborator Author

@vellip @hom3mad3 @goapunk got the frontend build passing 🟢, but now there's a coverage/coveralls error 🔴 as the coverage decreased by -0.005% 😄. The .py changes were just renaming things:

Can we bypass this?

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.

@sevfurneaux thank you for the great work and patience with all those comments, it looks great! ✨ 🤗

@sevfurneaux
Copy link
Collaborator Author

@sevfurneaux thank you for the great work and patience with all those comments, it looks great! ✨ 🤗

A pleasure! Thanks for both your comments, @hom3mad3 and @vellip: learnt a lot 🫶

@hom3mad3
Copy link
Contributor

hom3mad3 commented Jan 29, 2025

Thanks for the first part of that story! Great work, I just left a few remarks where you might want to have a second look.

@vellip, when you have some time, could you give it a thumbs-up? I don’t want to dismiss your change for request just so I can merge. Even though we don’t have a code of conduct with specific rules (which isn't ideal), I want to make sure we're being considerate and giving everyone a final word.

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.

Looks good, thank you so much!

@hom3mad3
Copy link
Contributor

@sevfurneaux thank you for the great work and patience with all those comments, it looks great! ✨ 🤗

A pleasure! Thanks for both your comments, @hom3mad3 and @vellip: learnt a lot 🫶

same here! 📙🤓

@hom3mad3 hom3mad3 merged commit 254d919 into dev Jan 29, 2025
2 of 3 checks passed
@hom3mad3 hom3mad3 deleted the sf-2025-add-kiezradar-list-new-edit-views branch January 29, 2025 11:54
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.

4 participants