Skip to content

4103: Open feedback via URL query#4168

Open
bahaaTuffaha wants to merge 8 commits into
mainfrom
4103-Open-feedback-via-query-param
Open

4103: Open feedback via URL query#4168
bahaaTuffaha wants to merge 8 commits into
mainfrom
4103-Open-feedback-via-query-param

Conversation

@bahaaTuffaha

@bahaaTuffaha bahaaTuffaha commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Short Description

We currently open the feedback via a local state parameter. While this works good for our feedback buttons, it is not possible to open the feedback from other routes (e.g. a link in a popup) without including the whole feedback component in the tree again, which is complicated, error prone and leads to duplication.

Proposed Changes

  • Created new query key FEEDBACK_QUERY_KEY and new param to toQueryParams.
  • Reused the useQueryParamVisibility and adjusted the open function to accept an optional parameter value.
  • Moved the FeedbackContainer from FeedbackToolbarItem into RegionContentLayout.tsx to behave like chat so it can be open form any where.
  • Adjusted FeedbackContainer to wrap the feedback with dialog instead and removed all of the props because we will depend on the queries to get the value for the feedback and the search query.
  • Removed FeedbackContainer from FeedbackToolbarItem.tsx and RegionContentMenu.tsx.
  • To extract search terms from quires I created a hook called useSearchFeedback.ts and path to extract slug.
  • Adjusted tests.

Side Effects

  • Now the search feedback will show up as pop up instead of embedded within the page.

Testing

  • Test feedback across the whole web-app.
  • Test search feedback (with/without results)
  • Test how it behaves with other queries like categories filter at the map , search and chat.
  • Check malte and aschaffenburg.

Resolved Issues

Fixes: #4103


@steffenkleinle steffenkleinle added the Web Affects the web project label Jun 9, 2026

@steffenkleinle steffenkleinle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Really really nice refactoring, gerat work! I love it! I think we can make a few things even simpler/more consistent, but otherwise this looks great already!
Tested on firefox, works as expected!

Comment thread web/src/hooks/useSearchFeedback.ts Outdated
Comment thread web/src/hooks/useQueryParamVisibility.ts Outdated
Comment thread web/src/hooks/useQueryParamVisibility.ts Outdated
Comment thread web/src/hooks/useQueryParamVisibility.ts Outdated
Comment thread web/src/components/RegionContentMenu.tsx
Comment thread web/src/components/FeedbackToolbarItem.tsx
Comment thread web/src/components/SearchFeedback.tsx Outdated
Comment thread web/src/components/FeedbackContainer.tsx Outdated
Comment thread web/src/components/SearchFeedback.tsx Outdated
Comment thread web/src/hooks/useQueryParamVisibility.ts Outdated
Comment thread web/src/components/FeedbackContainer.tsx Outdated
@bahaaTuffaha bahaaTuffaha force-pushed the 4103-Open-feedback-via-query-param branch 2 times, most recently from 5b2a0cf to ee8e4e6 Compare June 10, 2026 18:07
Comment thread shared/routes/query.ts Outdated
Comment thread web/src/components/FeedbackContainer.tsx Outdated
Comment thread web/src/components/RegionContentLayout.tsx Outdated
Comment thread web/src/hooks/useQueryParamVisibility.ts Outdated
Comment thread web/src/hooks/useQueryParamVisibility.ts
@bahaaTuffaha bahaaTuffaha force-pushed the 4103-Open-feedback-via-query-param branch from 24f1cae to 7caed3c Compare June 11, 2026 14:47
Comment thread web/src/components/FeedbackContainer.tsx Outdated
Comment thread shared/routes/query.ts Outdated
Comment thread shared/routes/query.ts Outdated
Comment thread web/src/components/FeedbackContainer.tsx Outdated
Comment thread web/src/components/FeedbackToolbarItem.tsx
@bahaaTuffaha bahaaTuffaha force-pushed the 4103-Open-feedback-via-query-param branch from 04fad3b to 3b22f30 Compare June 12, 2026 18:13

@steffenkleinle steffenkleinle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work! Not tested again :)

@lunars97 lunars97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks almost perfect to me 😻 , except for one question below.

Comment thread web/src/routes/PlacesPage.tsx Outdated
@bahaaTuffaha bahaaTuffaha requested a review from lunars97 June 18, 2026 15:28

@lunars97 lunars97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thank you for cleaning up and simplifying everything. Not tested again, tested before in Chrome as well as for Malte and Aschaffenburg 👍

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

Labels

Web Affects the web project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open feedback via URL query parameter

3 participants