Bug 200998 - [results.webkit.org Webkit.css] Change input's disable style
Summary: [results.webkit.org Webkit.css] Change input's disable style
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zhifei Fang
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-21 14:09 PDT by Zhifei Fang
Modified: 2019-08-22 11:51 PDT (History)
4 users (show)

See Also:


Attachments
Patch (7.39 KB, patch)
2019-08-21 14:11 PDT, Zhifei Fang
no flags Details | Formatted Diff | Diff
Patch (7.20 KB, patch)
2019-08-21 15:04 PDT, Zhifei Fang
no flags Details | Formatted Diff | Diff
Patch (7.17 KB, patch)
2019-08-21 15:23 PDT, Zhifei Fang
no flags Details | Formatted Diff | Diff
Patch (7.23 KB, patch)
2019-08-21 15:41 PDT, Zhifei Fang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhifei Fang 2019-08-21 14:09:31 PDT
I am using required and :vaild to detect if an input have value or not, but this will not work for disabled input, therefore, I change the disable style to assume they already have a value to avoid the label and input text overlay.

Long term solution here is I should make a input component, it will using js to detect if it has value already, and the user can use it more flexible. For now, all the input have the required attribute, this is ok for those send from directly through XHR, but not ok for those who have optional element in a form and submit the form via form action.
Comment 1 Zhifei Fang 2019-08-21 14:11:23 PDT
Created attachment 376922 [details]
Patch
Comment 2 Jonathan Bedard 2019-08-21 14:57:24 PDT
Comment on attachment 376922 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=376922&action=review

> Tools/resultsdbpy/resultsdbpy/view/static/library/css/index.html:1570
> +    <label>Disabled with existing value</label>

Doesn't really work in light mode.
Comment 3 Zhifei Fang 2019-08-21 15:04:16 PDT
Created attachment 376925 [details]
Patch
Comment 4 Jonathan Bedard 2019-08-21 15:09:29 PDT
Comment on attachment 376925 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=376925&action=review

> Tools/ChangeLog:11
> +        * resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

Can we make this changelog meaningful? Seems like the template prepare-changelog laid down is mostly meaningful.
Comment 5 Zhifei Fang 2019-08-21 15:23:41 PDT
Created attachment 376930 [details]
Patch
Comment 6 Jonathan Bedard 2019-08-21 15:33:26 PDT
Comment on attachment 376930 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=376930&action=review

> Tools/ChangeLog:9
> +        * resultsdbpy/resultsdbpy/view/static/library/css/docs.yaml: Adding a new example for disabled input that already have a value

'Adding a new example for disabled input that already has a value.'

> Tools/ChangeLog:13
> +        (.input>input[type="text"][required][disabled],.input>input[type="number"][required][disabled],):When disable, we set the style always like the one have value

'When disabling a text input element without a value, the style should match the style of a text input element with a value'
Comment 7 Zhifei Fang 2019-08-21 15:41:11 PDT
Created attachment 376937 [details]
Patch
Comment 8 WebKit Commit Bot 2019-08-22 11:50:07 PDT
Comment on attachment 376937 [details]
Patch

Clearing flags on attachment: 376937

Committed r249021: <https://trac.webkit.org/changeset/249021>
Comment 9 WebKit Commit Bot 2019-08-22 11:50:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2019-08-22 11:51:18 PDT
<rdar://problem/54608040>