Skip to content

refactor(site): Highlight immutable parameters and do a few tweaks #6490

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

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

Video about the proposed changes:

Screen.Recording.2023-03-03.at.14.23.04.mov

But I decided to move forward with the banner option instead because we have two scenarios:

  • Show the caption and primary text when the field has a name and description
  • Only show the primary text when the field only has a name
    Aligning the pill with these scenarios and making them look good was kinda hard. I also moved the icon to be left-center aligned with the text to make it easier to align with more generic cases.

Preview:
Screen Shot 2023-03-07 at 15 11 41

I added extra stories to make sure we are testing all the cases.

@BrunoQuaresma BrunoQuaresma requested review from mtojek and a team March 7, 2023 18:23
@BrunoQuaresma BrunoQuaresma self-assigned this Mar 7, 2023
@BrunoQuaresma BrunoQuaresma requested review from Kira-Pilot and removed request for a team March 7, 2023 18:23
@@ -70,16 +65,16 @@ export const RichParameterInput: FC<RichParameterInputProps> = ({
onChange,
parameter,
initialValue,
...props
...fieldProps
Copy link
Member

Choose a reason for hiding this comment

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

Why spread this? Isn't it just id?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nops, it passes other props. I probably should fix the types to make it clear... Going to make that.

>
<FormFields>
{props.templateSchema
// We only want to show schema that have redisplay_value equals true
Copy link
Member

@Kira-Pilot Kira-Pilot Mar 7, 2023

Choose a reason for hiding this comment

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

I like the addition of a comment here, but I'm still unclear as to why we don't want to show schemas with redisplay_value=false Ah, I see this isn't scoped to this PR; feel free to ignore

FormFooter,
HorizontalForm,
} from "components/HorizontalForm/HorizontalForm"
import { makeStyles } from "@material-ui/core/styles"
Copy link
Member

Choose a reason for hiding this comment

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

I think it's probably time for this file to be broken apart.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it is! I will do that.

Copy link
Member

@Kira-Pilot Kira-Pilot left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the vid

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Awesome!

{props.canCreateForUser && (
<FormSection
title="Workspace owner"
description=" The user that is going to own this workspace. If you are
Copy link
Member

Choose a reason for hiding this comment

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

nit: " The user <- starting spacebar

@BrunoQuaresma BrunoQuaresma merged commit 8900812 into main Mar 8, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/improve-rich-parameters-ui branch March 8, 2023 13:52
@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2023
@BrunoQuaresma
Copy link
Collaborator Author

Related to #6076

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants