feat: rename OIDC strategy, fix sidebar, UI improvements closes #271 #444

Merged
moritz merged 12 commits from feat/ux_polishment into main 2026-02-24 13:05:11 +01:00
Owner

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Renames the internal OIDC strategy from :rauthy to :oidc (including redirect URI update), fixes sidebar bugs (dropdown direction, accidental opening on desktop), and improves the cycle status button UI as well as minor consistency fixes.

Breaking: OIDC providers must update their redirect URI from /auth/user/rauthy/callback to /auth/user/oidc/callback.

What has been changed?

Refactoring / Breaking Change – OIDC Strategy Rename (:rauthy:oidc)

  • AshAuthentication strategy renamed: generated actions are now register_with_oidc / sign_in_with_oidc
  • Config keys, callback paths, helper functions, tests, docs and Docker Compose files updated
  • "Sign in with Rauthy" button translated to "Single Sign On" via Gettext
  • Gettext msgid corrected: "Sign in with Rauthy""Sign in with Oidc" (because Phoenix.Naming.humanize(:oidc) = "Oidc")
  • All remaining rauthy references in docs, code comments and guidelines updated

Bugfix – Sidebar

  • User menu dropdown now opens to the right when the sidebar is collapsed (instead of going off-screen to the left)
  • Mobile drawer no longer opens accidentally on desktop viewports (guard on window.innerWidth >= 1024)
  • phx-update="ignore" on mobile drawer checkbox prevents LiveView DOM patches from resetting its state
  • updated() hook in SidebarState restores the saved localStorage state after every LiveView patch
  • Temporary console.log debug statement removed

Style – Cycle Status Buttons (Paid / Suspended / Unpaid)

  • All three buttons are always visible (no conditional hiding)
  • Active status is colored (btn-success / btn-warning / btn-error + btn-active), inactive buttons are neutral gray — matches the filter button pattern
  • pointer-events-none instead of disabled attribute: prevents interaction without overriding the button color
  • aria-pressed added for accessibility
  • Buttons grouped with DaisyUI join component

Fix – Custom Fields Sorting

  • Custom fields are now sorted alphabetically by name by default (prepare build(sort: [name: :asc]))

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed (aria-pressed on status buttons)
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass (1831 tests, 0 failures)
  • axe-core dev tools show no critical or major issues

Additional Notes

  • The redirect URI change (/auth/user/rauthy/callback/auth/user/oidc/callback) must be applied in the OIDC provider (Rauthy admin panel or equivalent) before deploying.
  • The cover/ directory contains stale generated coverage report HTML files from before the rename — can be ignored.
## Description of the implemented changes The changes were: - [x] Bugfixing - [ ] New Feature - [x] Breaking Change - [x] Refactoring Renames the internal OIDC strategy from `:rauthy` to `:oidc` (including redirect URI update), fixes sidebar bugs (dropdown direction, accidental opening on desktop), and improves the cycle status button UI as well as minor consistency fixes. > **Breaking:** OIDC providers must update their redirect URI from `/auth/user/rauthy/callback` to `/auth/user/oidc/callback`. ## What has been changed? **Refactoring / Breaking Change – OIDC Strategy Rename (`:rauthy` → `:oidc`)** - AshAuthentication strategy renamed: generated actions are now `register_with_oidc` / `sign_in_with_oidc` - Config keys, callback paths, helper functions, tests, docs and Docker Compose files updated - "Sign in with Rauthy" button translated to "Single Sign On" via Gettext - Gettext `msgid` corrected: `"Sign in with Rauthy"` → `"Sign in with Oidc"` (because `Phoenix.Naming.humanize(:oidc) = "Oidc"`) - All remaining `rauthy` references in docs, code comments and guidelines updated **Bugfix – Sidebar** - User menu dropdown now opens to the right when the sidebar is collapsed (instead of going off-screen to the left) - Mobile drawer no longer opens accidentally on desktop viewports (guard on `window.innerWidth >= 1024`) - `phx-update="ignore"` on mobile drawer checkbox prevents LiveView DOM patches from resetting its state - `updated()` hook in `SidebarState` restores the saved `localStorage` state after every LiveView patch - Temporary `console.log` debug statement removed **Style – Cycle Status Buttons (Paid / Suspended / Unpaid)** - All three buttons are always visible (no conditional hiding) - Active status is colored (`btn-success` / `btn-warning` / `btn-error` + `btn-active`), inactive buttons are neutral gray — matches the filter button pattern - `pointer-events-none` instead of `disabled` attribute: prevents interaction without overriding the button color - `aria-pressed` added for accessibility - Buttons grouped with DaisyUI `join` component **Fix – Custom Fields Sorting** - Custom fields are now sorted alphabetically by name by default (`prepare build(sort: [name: :asc])`) ## Definition of Done ### Code Quality - [x] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [x] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [x] Aria labels are added when needed (`aria-pressed` on status buttons) - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [x] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass (1831 tests, 0 failures) - [ ] axe-core dev tools show no critical or major issues ## Additional Notes - The redirect URI change (`/auth/user/rauthy/callback` → `/auth/user/oidc/callback`) **must be applied in the OIDC provider** (Rauthy admin panel or equivalent) before deploying. - The `cover/` directory contains stale generated coverage report HTML files from before the rename — can be ignored.
moritz added 11 commits 2026-02-24 11:56:50 +01:00
Add `prepare build(sort: [name: :asc])` to the primary read action of
CustomField. Prevents order changes when toggling the `required` flag.
Wrap Paid/Suspended/Unpaid buttons in a <div class="join"> and add
join-item to each button. Delete button stays separate next to the group.
Add manual msgid/msgstr entries in auth.po (de + en) and auth.pot for the
dynamically interpolated OAuth2 sign-in button label.
- CSS: When sidebar is collapsed, open user-menu dropdown to the right
  (left: 0, right: auto) via data-sidebar-expanded="false" selector.
- JS: Guard drawerToggle change handler – prevent mobile drawer from
  opening on desktop viewports (window.innerWidth >= 1024).
- HTML: Add phx-update="ignore" to mobile-drawer checkbox to prevent
  LiveView from resetting its checked state on DOM patches.
- Rename AshAuthentication strategy from :oidc :rauthy to :oidc :oidc;
  generated actions are now register_with_oidc / sign_in_with_oidc.
- Update config keys (:rauthy → :oidc) in dev.exs and runtime.exs.
- Update default_redirect_uri to /auth/user/oidc/callback everywhere.
- Rename Mv.Accounts helper functions accordingly.
- Update Mv.Secrets, AuthController, link_oidc_account_live and all tests.
- Update docker-compose.prod.yml, .env.example, README and docs.

IMPORTANT: OIDC providers must be updated to use the new redirect URI
/auth/user/oidc/callback instead of /auth/user/rauthy/callback.
Remove the temporary console.log statement that was added during
sidebar state debugging.
Make Paid, Suspended and Unpaid buttons consistent by applying
btn-outline to all three, matching the outlined style pattern.
All three status buttons (Paid/Suspended/Unpaid) are now always
visible. The active status is highlighted with its color (btn-active),
inactive buttons are neutral gray - identical to the filter buttons.
Replace disabled attribute with pointer-events-none so the active
status button keeps its color (btn-success/warning/error btn-active)
instead of being grayed out by the browser's disabled styling.
Update action names (register_with_rauthy → register_with_oidc,
sign_in_with_rauthy → sign_in_with_oidc) and strategy name
(:rauthy → :oidc) in docs, code comments and guidelines.
Fix gettext msgid for OIDC sign-in button after strategy rename
All checks were successful
continuous-integration/drone/push Build is passing
d95d4dc737
Phoenix.Naming.humanize(:oidc) = "Oidc", so the generated msgid is
"Sign in with Oidc" (previously "Sign in with Rauthy" for :rauthy).
Update all .po/.pot files so the "Single Sign On" translation matches.
moritz added 1 commit 2026-02-24 12:07:32 +01:00
fix: add missing postal_code in seeds
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
623543b7bd
postal_code is a Vereinfacht-required field. When Vereinfacht is
configured, seeds failed for members without postal_code.
moritz changed title from feat: rename OIDC strategy, fix sidebar, UI improvements to feat: rename OIDC strategy, fix sidebar, UI improvements closes #271 2026-02-24 13:04:47 +01:00
moritz merged commit fca0194a7d into main 2026-02-24 13:05:11 +01:00
moritz deleted branch feat/ux_polishment 2026-02-24 13:05:12 +01:00
Sign in to join this conversation.
No description provided.