Skip to content

Selected framework is not consistent across multiple Code components in the page. #12451

Closed
@FeedMyCat54

Description

@FeedMyCat54

What is the improvement or update you wish to see?

The code block components in a page can get out of sync with each other and start showing code from different frameworks. I was able to spot this in the oauth getting started page but I guess this might be happening to other pages as well.

Is there any context that might help us understand?

The code block component gives the user the option to select a framework and view only the code for the selected framework. This then makes all the other code components show the code for that framework. However in the case where the list of available frameworks doesn't stay the same for every code component in the page, this behavior creates a few issues.

  1. The code components always so the n-th element of the list instead of the framework that was selected:
image image In the example above, the user selects "SvelteKit" in the components above. The parts that have 4 options update properly. The part "Add Signin button" however, contains an additional option (Next.js (Client)) before that and ends up showing the code for qwik.
  1. If the user tries to use the code component selector in a component that has more options than the other components they can potentially get out of sync.
image image In the example above I selected "Express" from the "Add Signin button". All the other components, that had less options, now show the code for Next.js

Does the docs page already exist? Please link to it.

https://authjs.dev/getting-started/authentication/oauth

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsRelates to documentationgood first issueGood issue to take for first time contributorsstaleDid not receive any activity for 60 days

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions