Skip to content

Web: Add outline-info Alert.tsx + move navigation code for general use#36554

Merged
kimlisa merged 6 commits intomasterfrom
lisa/wizard-stuff
Jan 31, 2024
Merged

Web: Add outline-info Alert.tsx + move navigation code for general use#36554
kimlisa merged 6 commits intomasterfrom
lisa/wizard-stuff

Conversation

@kimlisa
Copy link
Copy Markdown
Contributor

@kimlisa kimlisa commented Jan 11, 2024

part of https://github.com/gravitational/teleport.e/issues/2998

  • Add an alert type that's outlined (second time needing it so moved it to general use)
  • Adds nesting to shared Navigation component (basically just moving code from Discover for general use, refactor + test)

@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@kimlisa kimlisa added the no-changelog Indicates that a PR does not require a changelog entry label Jan 11, 2024
@kimlisa kimlisa changed the title Lisa/wizard stuff Web: Add outline-info Alert.tsx + move navigation code for general use Jan 11, 2024
* For simple views, defining indexes is not required.
*
*
* Example of how nesting views are used for Discover wizards:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can use @example tag https://jsdoc.app/tags-example

);
}

const index = props.view.index != null ? props.view.index : props.index;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const index = props.view.index != null ? props.view.index : props.index;
const index = props.view.index ?? props.index;

export function findViewAtIndex<T>(
views: BaseView<T>[],
currentStep: number
): BaseView<T> | null {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: I don't think this function returns null, it rather should be undefined.

views={indexedViews}
selectedResource={agentProps.resourceSpec}
/>
<Box mt="10px" mb="45px">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you think we could use theme values?

return {
background: fade(theme.colors.link, 0.1),
border: `${theme.radii[1]}px solid ${theme.colors.link}`,
borderRadius: `${theme.radii[3]}px`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Having a different border radius here is on purpose?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

- basically moves code out of Discovery for
  general use elsewhere
- refactor + test
@kimlisa kimlisa enabled auto-merge January 31, 2024 04:48
@kimlisa kimlisa added this pull request to the merge queue Jan 31, 2024
Merged via the queue into master with commit b935925 Jan 31, 2024
@kimlisa kimlisa deleted the lisa/wizard-stuff branch January 31, 2024 05:09
@public-teleport-github-review-bot
Copy link
Copy Markdown

@kimlisa See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR

kimlisa added a commit that referenced this pull request Feb 2, 2024
#36554)

* Add alert outline-info

* Add nesting to shared Navigation component

- basically moves code out of Discovery for
  general use elsewhere
- refactor + test

* Change imports

* Address CRs
github-merge-queue Bot pushed a commit that referenced this pull request Feb 2, 2024
#36554) (#37697)

* Add alert outline-info

* Add nesting to shared Navigation component

- basically moves code out of Discovery for
  general use elsewhere
- refactor + test

* Change imports

* Address CRs
mcbattirola pushed a commit that referenced this pull request Feb 13, 2024
#36554)

* Add alert outline-info

* Add nesting to shared Navigation component

- basically moves code out of Discovery for
  general use elsewhere
- refactor + test

* Change imports

* Address CRs
github-merge-queue Bot pushed a commit that referenced this pull request Feb 13, 2024
#36554) (#38150)

* Add alert outline-info

* Add nesting to shared Navigation component

- basically moves code out of Discovery for
  general use elsewhere
- refactor + test

* Change imports

* Address CRs

Co-authored-by: Lisa Kim <lisa@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants