Skip to content

Conversation

@izaaklauer
Copy link
Contributor

@izaaklauer izaaklauer commented Oct 28, 2024

Preview: https://clerk.com/docs/pr/1664/organizations/org-slugs-in-urls
✅ Depends on https://github.com/clerk/clerk-docs/pull/1634/files
✅ Depends on publication of https://github.com/clerk/orgs

What changed?

This adds a new DX guide based on new middleware options (introduced in clerk/javascript#3977) for managing the active clerk organization with URL patterns.

@izaaklauer izaaklauer requested a review from a team as a code owner October 28, 2024 20:17
@github-actions
Copy link
Contributor

Hey, here’s your docs preview: https://clerk.com/docs/pr/1664

Comment on lines 66 to 67
> links with their coworkers. Public documentation, marketing, and third-party blogs are also
> made easier to write if links aren't tied to any specific organization.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does this feel clear enough to folks? If not, I can add an example. It would be something like:

For example, if someone is writing a public post that includes a link to settings, if that link is /orgs/acmecorp/settings, it will only be useful to employees of Acmecorp! If the URL is just /settings, then it's universally applicable and automatically contextualized into the click-er's organization by virtue of the organization encoded on the Clerk session.

> Skipping organization activation.
> [!CAUTION]
> It is ultimately the responsibility of the page to ensure that it renders the appropriate content for a given URL, and
Copy link
Member

Choose a reason for hiding this comment

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

IMO those "caution" blocks can be a bit alarming to developers. I'd suggest removing this block and putting more specific guidance with comments on the code block below.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with Laura. We should avoid having multiple callouts especially ones that are lengthy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll be honest, inspiring mild alarm in the reader is what I was going for. If a developer were to just look at the organization slug in the URL, assume this meant that the middleware authorized access to the org, then render some sensitive org-specific content from their backend, that would be a very bad bug.

Hey @brkalow , do you happen to have an opinion on the best way to communicate this one?

izaaklauer and others added 5 commits October 29, 2024 10:02
Thank you @LauraBeatris for the suggestions!

Co-authored-by: victoria <github@victoriahchang.com>
Co-authored-by: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Co-authored-by: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Copy link
Member

@LauraBeatris LauraBeatris left a comment

Choose a reason for hiding this comment

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

🏅 Looking good! I'll leave the rest of the feedback here to @victoriaxyz

Copy link
Contributor

@victoriaxyz victoriaxyz left a comment

Choose a reason for hiding this comment

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

Looking great! 🎉

Some notes:

  • headings should be in active voice
  • use contractions for verbs
  • avoid using too many callouts

izaaklauer and others added 6 commits October 31, 2024 09:49
Thank you @victoriaxyz and @alexisintech for the suggestions!

Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
Co-authored-by: victoria <github@victoriahchang.com>
Co-authored-by: victoria <github@victoriahchang.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
Co-authored-by: victoria <github@victoriahchang.com>
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com>
@alexisintech alexisintech force-pushed the izaak/orgs-132-dx-guide branch from 0df3fd6 to 5d7de1a Compare November 4, 2024 18:55
@victoriaxyz
Copy link
Contributor

Hey @izaaklauer, here are my update: 3957f81 and ba9a40b

  • rewrite sections and headings
  • fix title, description, and steps in <TutorialHero />
  • fix code examples: file names, line highlighting, param order, and comments

Copy link
Contributor Author

@izaaklauer izaaklauer left a comment

Choose a reason for hiding this comment

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

@alexisintech alexisintech merged commit fcd6039 into main Dec 20, 2024
4 checks passed
@alexisintech alexisintech deleted the izaak/orgs-132-dx-guide branch December 20, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants