Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORV2-2834 - FE: Update: Change Start Application Menu and Steps #1635

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

glen-aot
Copy link
Collaborator

@glen-aot glen-aot commented Oct 11, 2024

Description

Implements the nested dropdown menu for selecting a permit application type.

Fixes #ORV2-2834

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are promoted to:

Copy link

sonarcloud bot commented Oct 11, 2024

Copy link

sonarcloud bot commented Oct 11, 2024

Copy link

sonarcloud bot commented Oct 11, 2024

}
>
<Button
className={`start-application-action__input ${open && "start-application-action__input--open"} ${isError && "start-application-action__input--error"}`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This className seems too long, you might want to extract it out into a variable and assign the variable here instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also please use the proper ternary syntax rather than the "&&" approach, especially here in string interpolations (ie. use open ? "..." : "" instead of open && "...")

open={open}
slotProps={{
paper: {
className: `start-application-action__menu-container ${open && "start-application-action__menu-container--open"}`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use proper ternary syntax here, and also consider extracting this long className into a variable

Start Application
</Button>
</div>
{isError && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use ternary operator here instead (ie. isError ? (<span>...</span>) : null)

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