Repository navigation
Organization selection, support-session banner, README no longer documents a nonexistent option - #1
Merged
Conversation
…inds
useOrganization() is the headless half of the switcher: the organization
the session is bound to, the person's membership tier in it (org_role, taken
from the token over the possibly older organizations list), their
organizations, and switchOrganization(id) through urls.switchOrganization.
The switcher no longer names the first listed organization as current when
the session is bound to none. Showing one organization's name over a session
not bound to it is the exact mistake organization binding exists to prevent.
Without the `organizations` scope there is no list, so urls.selectOrganization
(a prompt=select_organization route) makes it a link to the hosted picker; it
also sits at the foot of the menu.
<SupportSessionBanner> and useSupportSession() show while a member of staff
is signed in as the user (RFC 8693 `act`, exposed by id-js 0.17 as
user.actor). Fail-closed: the provider keeps an unreadable actor as
{ sub: null } so the banner still draws, and narrows a readable one to its
subject alone. The banner tints over transparent rather than Canvas, which
follows the OS and came out near-black on a light page viewed on a dark OS.
@cboxdk/id-js ^0.17.0 is an optional peer: nothing imports it, but the fields
drawn here are produced by it, and the range resolves once 0.17.0 ships.
The README told users to call createAuthorizationRequest({ organizationId }).
id-js has no such option, and the server parameter is `organization`. The
section now uses id-js's switchOrganization(id), shows the select and create
routes, explains that the list needs the `organizations` scope, and documents
useOrganization(), the support-session banner, and the id-js 0.17 requirement.
CHANGELOG.md starts here with an Unreleased entry.
The switcher shares .cbox-id-menu with the user button, which is anchored right: 0 because the avatar sits at the end of a header. The switcher sits at the start, so the same rule grew its menu leftwards past the viewport edge. It now opens from its own left edge (.cbox-id-anchor--start), the same fix as id-vue. Checked rendered at 375 and 1280 px in both themes: the menu spans 16-308 px with no horizontal scroll.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the Cbox ID UX/DX program (https://claude.ai/artifact/W9TnQg4o9tGKgqPPAUppTy), matching laravel-id 1.19 (cboxdk/laravel-id#8). Will be released once the cbox-id server side is live. Details in CHANGELOG.