Skip to content

Step one component#75

Open
javiert-okta wants to merge 17 commits intodebugger-steps-componentfrom
step-one-component
Open

Step one component#75
javiert-okta wants to merge 17 commits intodebugger-steps-componentfrom
step-one-component

Conversation

@javiert-okta
Copy link
Contributor

@javiert-okta javiert-okta commented Jan 8, 2026

By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

The following PR adds the step one component, which shows the request that will be done to the Auth0 tenant. The changes include:

  • A common button component for this step and to be used across all the app.
  • Add a new arrow icon for rendering in the button
  • A codeblock component. This is an important component since it will render all the possibilities across all steps. It will be able to render the requests, tokens and json responses.
  • Updated the debugger steps component to add styling to each step container
  • Update values on the globals styling scss file

Screenshots

  • Dark theme

Desktop

image

Mobile

image
  • Light Theme

Desktop

image

Mobile

image

References

Link to Figma design

Testing

  • Verify that the step one component matches the design on the figma file (dark/light mode, desktop, tablet and mobile)
  • Verify the Codeblock component has horizontal scrolling on mobile
  • Verify the start button is accessible and clickable

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@github-actions
Copy link

@github-actions
Copy link

@github-actions
Copy link

@github-actions
Copy link

@github-actions
Copy link

onClick?: () => void;
}) => {
return (
<button className={styles.button} onClick={onClick}>
Copy link
Contributor

Choose a reason for hiding this comment

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

add type="button" as this is not used to submit a form

};
interface CodeBlockProps {
title: string;
type: "request" | "json";
Copy link
Contributor

Choose a reason for hiding this comment

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

"json" does not seem to be implemented, might be in a future PR?

.code_block {
color: var(--color_fg_link);
font-feature-settings: 'liga' off, 'clig' off;
font-family: "Roboto Mono";
Copy link
Contributor

Choose a reason for hiding this comment

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

Use var(--font-mono)

</div>
{requestData.params.map((data, idx) => (
<div key={idx} className={styles.code_line}>
<p className={styles.code_line_number}>{`0${idx + 2}`}</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is a request always going to be less than 9 lines? Otherwise, this line numbering will break, eg, 09 , 010.

Implementing a helper function that adds padding might be a better solution:

const formatLineNumber = (num: number) => num.toString().padStart(2, '0');

<p className={styles.code_line_number}>{formatLineNumber(1)}</p>
...
<p className={styles.code_line_number}>{formatLineNumber(idx + 2)}</p>

(This will again break with 100 cause of the padding 2)

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.

2 participants