Skip to content

Conversation

@sanne-san
Copy link
Contributor

@sanne-san sanne-san commented Nov 14, 2025

Changes

  • Replace the Add goal button in goal settings with a dropdown button to directly select the goal type. This way, a modal opens with the correct form for the selected goal type. The tabs in the modal have been removed.
  • Add a new pill component to show the goal type in the table in a more distinct way. The settings_badge component is replaced with the pill component. The pill component that was used in plan_box.ex is renamed to highlight_pill.
  • Replaced Belongs to funnel text with a funnel icon in the goal settings list.
  • Some small tweaks like increasing the search bar width, the padding of the table cells, and adding a header to the goal settings list.

Tests

  • Automated tests have been added

Dark mode

  • The UI has been tested both in dark and light mode

@github-actions
Copy link

Preview environment👷🏼‍♀️🏗️
PR-5886

@sanne-san
Copy link
Contributor Author

sanne-san commented Nov 14, 2025

@aerosol I used the Prima dropdown component that you used on /sites too. Seeing a weird quirk and I wonder if this is related to the same issue we've been having with page refresh in the empty states work, or it's a problem with the component: after adding a goal, the dropdown button doesn't respond unless I do a page refresh – see video.

CleanShot.2025-11-14.at.13.02.12.mp4

@sanne-san sanne-san requested a review from a team November 14, 2025 18:42
@aerosol
Copy link
Member

aerosol commented Nov 18, 2025

@aerosol I used the Prima dropdown component that you used on /sites too. Seeing a weird quirk and I wonder if this is related to the same issue we've been having with page refresh in the empty states work, or it's a problem with the component: after adding a goal, the dropdown button doesn't respond unless I do a page refresh – see video.
CleanShot.2025-11-14.at.13.02.12.mp4

I'm not sure what's at fault yet, but the prima button element is losing its event listener on successful goal submission. Could be related either to pre-existing modal complexity or some hooks lifecycle, e.g. prima dropdown missing updated() hook perhaps? (https://hexdocs.pm/phoenix_live_view/js-interop.html#client-hooks-via-phx-hook)

@aerosol
Copy link
Member

aerosol commented Nov 18, 2025

plausible/prima#15

@ukutaht
Copy link
Contributor

ukutaht commented Nov 20, 2025

@aerosol agree with your analysis and solution. I've merged plausible/prima#17 and published a new version of prima 0.1.9 on hex.

Copy link
Contributor

@ukutaht ukutaht left a comment

Choose a reason for hiding this comment

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

Great work! Looks good to me

sanne-san and others added 8 commits November 24, 2025 09:35
- Replace the `Add goal` button in goal settings with a dropdown button to directly select the goal type. This way, a modal opens with the correct form for the selected goal type. The tabs in the modal have been removed.
- Add a new `pill` component to show the goal type in the table in a more distinct way. The `settings_badge` component is replaced with the `pill` component. The `pill` component that was used in `plan_box.ex` is renamed to `highlight_pill`.
- Replaced `Belongs to funnel` text with a funnel icon in the goal settings list.
- Some small tweaks like increasing the search bar width, the padding of the table cells, and adding a header to the goal settings list.
@sanne-san sanne-san requested a review from aerosol November 24, 2025 10:48
Copy link
Member

@aerosol aerosol left a comment

Choose a reason for hiding this comment

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

🚀

@sanne-san sanne-san added this pull request to the merge queue Nov 24, 2025
Merged via the queue into master with commit 2c00acc Nov 24, 2025
16 checks passed
@aerosol aerosol deleted the sanne-goal-settings branch November 24, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants