Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Conversation

@usame-algan
Copy link
Contributor

@usame-algan usame-algan commented Feb 23, 2022

What it solves

Resolves #3475 #534

How this PR fixes it

All input/form fields now use the outlined style instead of filled.

How to test it

  1. Open the Safe app
  2. Interact with every form
  3. Observe that input fields are outlined instead of filled as specified here

Additionally, forms should be tested on Windows to prevent a potential regression with overflowing content within input fields.

Screenshots

Screenshot 2022-02-23 at 18 20 02

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Feb 23, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@coveralls
Copy link

coveralls commented Feb 23, 2022

Pull Request Test Coverage Report for Build 1927258919

  • 0 of 7 (0.0%) changed or added relevant lines in 4 files are covered.
  • 184 unchanged lines in 23 files lost coverage.
  • Overall coverage increased (+0.08%) to 35.408%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/MethodsDropdown/index.tsx 0 1 0.0%
src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/RenderInputParams/InputComponent/ArrayTypeInput.tsx 0 1 0.0%
src/routes/safe/components/Balances/SendModal/screens/SendCollectible/style.ts 0 2 0.0%
src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/MethodsDropdown/style.ts 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
src/logic/hooks/useEstimateSafeCreationGas.tsx 1 88.0%
src/logic/wallets/pairing/hooks/usePairing.ts 1 0%
src/logic/wallets/pairing/utils.ts 1 53.33%
src/routes/safe/components/Balances/SendModal/screens/SendCollectible/CollectibleSelectField/index.tsx 1 0%
src/routes/safe/components/Balances/SendModal/screens/SendCollectible/TokenSelectField/index.tsx 1 0%
src/routes/safe/components/Settings/SpendingLimit/FormFields/Amount.tsx 1 23.08%
src/components/AppLayout/Header/components/ProviderDetails/PairingDetails.tsx 2 0%
src/logic/notifications/notificationBuilder.tsx 3 30.43%
src/logic/wallets/onboard.ts 3 31.58%
src/components/AppLayout/Header/components/ProviderDetails/ConnectDetails.tsx 4 0%
Totals Coverage Status
Change from base Build 1888234803: 0.08%
Covered Lines: 3405
Relevant Lines: 8680

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Feb 23, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1927296524

Failed tests:

  • ❌ Add an existing safe Add an existing safe
  • ❌ Read-only transaction creation and review Read-only transaction creation and review

Copy link
Contributor

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

Nice work on this! Great to see you tweak a few inconsistencies along the way. Did you consult with @yagopv? I don't know if there's any likelihood we could move some of this in his SRC PR perhaps?

You might be able to condense some of the 'extra' styling into global overrides but I'll trust your judgement on that. I'd recommend converting the new MUI styling over to styled-components though.

Side note: there's a missing return type in src/components/forms/SelectField/index.tsx.

},
})

export const selectedTokenStyles = createStyles({
Copy link
Contributor

Choose a reason for hiding this comment

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

Please see my comment further up about styling in MUI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This also already existed. I moved it into a new file since it was duplicated before for SendFunds and SendCollectible. We should do the refactor to styled-components in a separate task.

},
},
MuiFormHelperText: {
MuiFormControl: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you checked for <FormControl> components across the app? When you add new overrides, they will ofc affect all instances already present.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change replaces the overflowStyle that I deleted where the width was set inline to 100% and overflow:hidden which interferes with the new input labels. There was also a cryptic comment // Neded for solving a fix in Windows browsers so we should make sure to do a full regression test on all form elements. We can still use width: 100% instead of flex: 1 as it is a bit more explicit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Make sure to add a comment about that to the testing section.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Approved but there are lint issues.

@katspaugh
Copy link
Member

This lint, I meant:

Screenshot 2022-03-01 at 15 41 55

Copy link
Contributor

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments. Just some lint left.

@iamacook
Copy link
Contributor

iamacook commented Mar 2, 2022

The Safe name field in the Safe creation doesn't have a correctly coloured placeholder:

image

It looks as though the Safe is to be called "Safe name".

The dropdowns are a little skewed too. The numbers don't align quite right:

image

@usame-algan
Copy link
Contributor Author

The Safe name field in the Safe creation doesn't have a correctly coloured placeholder

This is the label that animates to the top once the input is selected (Figma reference). One alternative we have is forcing the shrink state by default e.g.
Screenshot 2022-03-02 at 11 01 10

We could also remove it altogether in this case since there is already a label above the input field "Name of the new safe"

@iamacook
Copy link
Contributor

iamacook commented Mar 2, 2022

Are you overriding the label colour? I'd suggest removing that. See the top right example here.

@usame-algan
Copy link
Contributor Author

Are you overriding the label colour? I'd suggest removing that. See the top right example here.

We are overriding the label color as defined in Figma but I don't mind making it a bit lighter. cc @liliiaorlenko

@iamacook
Copy link
Contributor

iamacook commented Mar 2, 2022

We are overriding the label color as defined in Figma but I don't mind making it a bit lighter.

In this context, I would argue that it is more of a placeholder. I initially thought we had a bug naming the Safe.

@usame-algan usame-algan temporarily deployed to Manual March 2, 2022 10:32 Inactive
@usame-algan usame-algan temporarily deployed to Manual March 2, 2022 10:34 Inactive
@github-actions
Copy link

github-actions bot commented Mar 2, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@francovenica
Copy link
Contributor

Load safe form - Owners list
The names that are autocompleted (whatever those be because ENS primary names or address that already have names in the address book) are being stomped by the input name, in this case the text "owner name"

In this gif you can see that some owners have an ENS name already, but those are considered placeholders. See how when I enter a name manually "test1" the "owner name" label is moved to the top of the input
03-02-2022_x(4426)

@francovenica
Copy link
Contributor

francovenica commented Mar 2, 2022

The new error message outside of the input make the modals wiggle much more when the error is shown or not.
In the original version, since the error message was inside the input the modal would barely stretch the modal when the error was shown
03-02-2022_x(4430)

EDIT:
Regarding this, maybe we can make all the inputs like this one "Recipient", where the name is in the upper corner all the time and the error message is shown there instead of showing outside. This is outside of the scope of this ticket, but could be discussed with the team if it is something that can be implemented
image

@usame-algan usame-algan temporarily deployed to Manual March 3, 2022 09:44 Inactive
@usame-algan
Copy link
Contributor Author

The names that are autocompleted are being stomped by the input name, in this case the text "owner name"

Good catch, I adjusted the owner name input fields to be "shrunk" by default so the ENS Name is always visible

Regarding this, maybe we can make all the inputs like this one "Recipient", where the name is in the upper corner all the time and the error message is shown there instead of showing outside. This is outside of the scope of this ticket, but could be discussed with the team if it is something that can be implemented

I like the idea of keeping the error message at the top so the layout doesn't "jump". Some of our error messages are very unspecific like "Required" and would overwrite the input label which could affect UX negatively so we should discuss this cc @liliiaorlenko

@francovenica
Copy link
Contributor

The issue reported with the names during the load safe process was fixed.

For the other comment I think is best to create a new ticket to discuss it so we can pass this one

@francovenica
Copy link
Contributor

Created this new ticket to discuss the error message placement #3621. I'll pass this one to QA done

@usame-algan usame-algan merged commit 10f502c into dev Mar 4, 2022
@usame-algan usame-algan deleted the outlined-input-migration branch March 4, 2022 08:35
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2022
@liliiaorlenko
Copy link

I dont mind error messages on top, just make it consistent everywhere

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.

[Style] Migrate to "outlined" inputs

7 participants