Repository navigation
fix(apply): start community applications from the selected organization - #472
Open
elliotBraem wants to merge 1 commit into
Open
elliotBraem wants to merge 1 commit into
elliotBraem wants to merge 1 commit into
Conversation
/apply now resolves the applying organization up front — the ?org= parameter first, otherwise the session's active organization — instead of reactively linking whatever the user happens to type into the web address field. An eligible org (active, not personal, no community bound, applicant is owner) prefills the name, locks the submission to its slug, submits the payload with orgId, and renders the resulting web address as static text below the name instead of an input, so the "An organization already uses this address" error can no longer appear for the applicant's own organization. An ineligible selection prompts the applicant to pick another organization rather than falling back to a confusing free-form slug field; applicants with no organization keep the plain form and its availability checks.
This branch has not been deployed
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.
Problem
Starting a community still ended on the Web Address field and
"An organization already uses this address. Choose another one." even
though #466 and #468 merged. Those PRs made the form tolerate a slug
collision with the applicant's own organization, but kept the
slug-input-first design:
?org=— every otherentry point (nav, landing page, dashboard next steps, proposals page)
links to bare
/apply, so nothing was prefilled.only kicked in after the user typed/derived a matching slug, and the
checkSlugquery raced the ownership lookup in between, flashing the"address is taken" error.
What changed
/applyresolves the applying organization up front: the?org=parameter first, otherwise the session's active organization.
(
communityProposalId), and the applicant is an owner (vialistMembers).slug, payload submitted with
orgId, and the web address rendered asstatic text below the name (
<slug>.<gateway>), not an input.checkSlugnever runs, so the taken-address error is impossible.not the owner) → a "Choose an organization" prompt linking to the
organizations page, instead of a confusing free-form slug field.
existing availability checks (the nav "Start a community" bootstrap
path for applicants with no organization).
checkSlugreturning "taken" in the gap).added
apply.organization.pickPromptin en/es/fr/zh.Tests
rendered as text, no
checkSlug,orgIdin the payload, defaultactive-org path and
?org=path) and free-form mode (taken-slugerror, no
orgId, revision/legacy-org retention).pnpm run typecheck,pnpm run lint, and the full ui suite(1129 tests) pass.