Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Redesign: Add a form field component #2463

Merged
merged 2 commits into from
Jan 20, 2019

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Jan 20, 2019

The label moves into the border on focus and after being filled. A valid color
is applied to the label and input border. Other states like invalid can be added
later as needed.

Adapted from @ara4n's experiment into a React component with a CSS only
approach.

form-fields

The label moves into the border on focus and after being filled. A valid color
is applied to the label and input border. Other states like invalid can be added
later as needed.

Adapted from @ara4n's experiment into a React component with a CSS only
approach.
@jryans jryans requested a review from a team January 20, 2019 04:18
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

Some variables might need to be added to riot-web's status theme as well (errors might not crop up until someone uses the component, though)

src/components/views/elements/Field.js Outdated Show resolved Hide resolved
@jryans
Copy link
Collaborator Author

jryans commented Jan 20, 2019

Some variables might need to be added to riot-web's status theme as well (errors might not crop up until someone uses the component, though)

These days, such errors seem to appear at build time. (Perhaps that's new as of the content hashed image work, unsure...) In any case, the Status theme root imports the light theme's _base.scss, so it should be okay.

@turt2live
Copy link
Member

so it does... I wonder why I've never had luck with that...

I guess it's fine though - it seems to build fine

@jryans jryans merged commit d7031c1 into matrix-org:experimental Jan 20, 2019
@ara4n
Copy link
Member

ara4n commented Jan 20, 2019

woo, awesome :) thank you! i don’t believe we need to worry about keeping the status theme working with Experimental.

the demo gif here highlights that we need to distinguish “focused” from “valid” somehow; need input from @nadonomy here

@nadonomy
Copy link
Contributor

@jryans looking great! Small tweak/fix request; the label is vertically misaligned:

screenshot 2019-01-21 at 12 20 44

@ara4n yeah I was thinking about this while designing; whatever blue we're using for anchor tags should feel great for focused input.

@ara4n
Copy link
Member

ara4n commented Jan 21, 2019

@nadonomy okay - so how do we distinguish between unfocused-and-valid and focused-and-valid? as the current zeplin implies they should both be green atm...

@nadonomy
Copy link
Contributor

@ara4n just updated the comp in Zeplin to show what I'm thinking: https://zpl.io/VDqejkr

@jryans
Copy link
Collaborator Author

jryans commented Jan 21, 2019

Opened #2468 for the label alignment and new focused color.

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.

5 participants