+
Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

ynotdraw
Copy link
Collaborator

@ynotdraw ynotdraw commented Nov 19, 2024

🚀 Description

  • Updates the placeholder colors for Dropdown, Input, and Textarea to match designs.
  • Updates the variables from Figma.

📋 Checklist

🔬 How to Test

Placeholder colors were updated throughout, so double-check these situations:

There should be more contrast!

📸 Images/Videos of Functionality

Before After
before-input-disabled-placeholder after-input-disabled-placeholder
before-textarea-disabled-placeholder after-textarea-disabled-placeholder
before-dropdown-disabled-placeholder after-dropdown-disabled-placeholder
before-dropdown after-dropdown
before-textarea after-textarea
before-input after-input
before-dropdown-filterable after-dropdown-filterable

@ynotdraw ynotdraw self-assigned this Nov 19, 2024
Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: cd70a2e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@crowdstrike/glide-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@ynotdraw ynotdraw force-pushed the placeholder-and-disabled-fixes branch from 40fcdff to cd70a2e Compare November 19, 2024 18:53
'--glide-core-text-placeholder' has dark mode issues. Aligns
with Input and Textarea as suggested by design.
*/
color: rgb(117 117 117);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice to see this getting cleaned up!

Comment on lines -249 to -251
&.disabled {
color: var(--glide-core-text-tertiary-disabled);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From what I could tell, this isn't a valid visual state anymore due to the javascript in dropdown.ts. We only show the placeholder, when there is no value and in the single-select case. We want the placeholder color to remain the same, no matter if it's disabled or not. This happens on line 236 above.

With this line, we would override that color value, making the placeholder washed out.

return html`<span
class=${classMap({
placeholder: true,
disabled: this.disabled,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The above comment address this deletion.

}
&::placeholder {
color: var(--glide-core-text-placeholder);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for the filterable / multi-select case. Since dropdown renders an input element here, we can use the pseudo element like in Input and Textarea 🎉

@ynotdraw ynotdraw marked this pull request as ready for review November 19, 2024 20:05
@ynotdraw ynotdraw merged commit 8791ada into main Nov 20, 2024
7 checks passed
@ynotdraw ynotdraw deleted the placeholder-and-disabled-fixes branch November 20, 2024 00:26
@github-actions github-actions bot mentioned this pull request Nov 20, 2024
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载