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

Commit 9a0efd3

Browse files
material-web-copybaraasyncliz
authored andcommitted
Project import generated by Copybara.
PiperOrigin-RevId: 292612246
1 parent b3f70eb commit 9a0efd3

File tree

4 files changed

+153
-65
lines changed

4 files changed

+153
-65
lines changed

docs/open_source/rotation.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Rotation
2+
3+
[TOC]
4+
5+
This page outlines responsibilities for the oncall rotation and issue triaging
6+
of MDC Web.
7+
8+
## Before you start
9+
10+
* Complete MDC Web [onboarding](http://go/mdc-web-onboard) process.
11+
* Join
12+
[MDC Web rotation](https://rotations.corp.google.com/rotation/5708184800985088)
13+
calendar.
14+
* Add "Material Web Triage" meeting to your calendar.
15+
* Go to
16+
[MDC Web ZenHub Dashboard](https://goto.google.com/mdc-web-triage-bugs) to
17+
see Untriaged issues. (Sort Untriaged pipeline
18+
[by New](https://screenshot.googleplex.com/r90Yeco4ebw.png))
19+
* Set up notifications of your GitHub profile to receive emails for any
20+
activity on MDC Web
21+
[GitHub repository](https://github.com/material-components/material-components-web)
22+
when you're on-call.
23+
24+
## Rotation
25+
26+
Responsibilities of rotation on-call include:
27+
28+
* Responding to GitHub
29+
[issues](https://github.com/material-components/material-components-web/issues)
30+
* Code reviewing external / internal GitHub
31+
[pull requests](https://github.com/material-components/material-components-web/pulls)
32+
(PR's)
33+
* Importing external GitHub PR's when they're ready to merge. See
34+
go/mdc-web-g3sync
35+
36+
### Issues
37+
38+
Being on-call does not mean you have be the one to actually fix issues, we
39+
simply triage. Issues may fall in one of the following categories.
40+
41+
#### Feature Requests
42+
43+
First, check if this request is in the [spec](https://material.io/guidelines).
44+
If you're not sure, reach out to Material System UX on-call - go/system-team or
45+
open a thread in Material System chat room:
46+
47+
* If it is not in spec, respond on the PR that we do not accept feature
48+
requests for components that are not in our spec, and close it.
49+
* If it is in the spec, discuss in triage meeting and move it to backlog.
50+
51+
#### Bugs
52+
53+
When a bug is reported, first ensure it has clear reproducible steps with
54+
sufficient information. If not, point them to our
55+
[bug template](https://github.com/material-components/material-components-web/issues/new?assignees=&labels=bug&template=--bug-report.md&title=%5BComponentName%5D+title)
56+
and ask for more information.
57+
58+
If you're able to reproduce the bug and it is a legitimate bug in MDC Web,
59+
respond that you were able to reproduce the bug and move it to backlog. If
60+
you're not able to reproduce the bug, ask for more information.
61+
62+
If the bug is small, encourage them to open a PR before moving it to backlog.
63+
64+
#### Other issues
65+
66+
There are other issues outside of FR's or bugs, although try not to spend too
67+
much time investigating issues that are out of scope for MDC Web. Issues can be
68+
closed if you think they are out of scope.
69+
70+
* There are a few **installation problems** that we can help with, such as,
71+
installing MDC Web components and usage. However, it's best if the answer to
72+
this question is a link to documentation. If it is out of scope, tell the
73+
reporter we do not have the expertise to help them with this question,
74+
suggest they ask on Stack Overflow for better results, and close the issue.
75+
* Respond to any **general questions** and see if we're missing any
76+
documentation. Encourage them to post on Stack Overflow instead and close
77+
it.
78+
79+
### Pull requests
80+
81+
Any external contributions received via GitHub
82+
[pull requests](https://github.com/material-components/material-components-web/pulls)
83+
on MDC Web repo needs to be reviewed or needs attention. Googlers should always
84+
send CLs.
85+
86+
Follow these steps to address any external contributions:
87+
88+
* When you're reviewing code, identify if PR contains any breaking change. If
89+
it is a huge breaking change, ask the author to revert any breaking changes
90+
or close the PR.
91+
* Follow go/mdc-web-g3sync to import a PR into google3/. (You may need to add
92+
additional changes in google3, such as updating BUILD rules.)
93+
* PR can't be merged without importing it into google3.
94+
* Always run a TGP (go/tgp) on the imported CL.
95+
96+
## Triage meeting
97+
98+
Triage meeting happens every Friday. If you're on-call that week, attendance is
99+
mandatory.
100+
101+
On-call primary drives this meeting. Triaging involves the following steps:
102+
103+
* Open [MDC Web ZenHub Dashboard](https://goto.google.com/mdc-web-triage-bugs)
104+
and present it to everyone.
105+
* Sort "Untriaged" pipeline by "New" (any new issues that are opened
106+
automatically appear here).
107+
* Go through issues that you think that needs team discussion.
108+
109+
In most of the cases, the oncall should have already gone through all new issues
110+
and have a good understanding of the issue. This makes the triage meeting
111+
smoother to discuss.

docs/open_source/triage.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

packages/mdc-textfield/_mixins.scss

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,13 @@
9595
.mdc-text-field__input {
9696
// Exclude setting line-height to keep caret (text cursor) same height as the input text in iOS browser.
9797
@include typography-mixins.typography(subtitle1, $exclude-props: (line-height), $query: $query);
98+
@include input-padding_($query: $query);
9899

99100
@include feature-targeting-mixins.targets($feat-structure) {
100101
align-self: flex-end;
101102
box-sizing: border-box;
102103
width: 100%;
103104
height: 100%;
104-
padding:
105-
variables.$input-padding-top
106-
variables.$input-padding
107-
variables.$input-padding-bottom + variables.$input-border-bottom;
108105
border: none;
109106
border-radius: 0;
110107
background: none;
@@ -162,10 +159,7 @@
162159

163160
// Vertically center aligns the text input placeholder and value for only filled variant.
164161
.mdc-text-field--no-label:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) & {
165-
@include feature-targeting-mixins.targets($feat-structure) {
166-
padding-top: 16px;
167-
padding-bottom: 16px + variables.$input-border-bottom;
168-
}
162+
@include input-no-label-padding_($query: $query);
169163
}
170164
}
171165

@@ -445,20 +439,18 @@
445439
height: $height;
446440
}
447441

448-
// Target only dense text field.
449-
@if $height <= 40px {
450-
// Target only IE 11.
451-
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
452-
.mdc-text-field__input {
453-
@include feature-targeting-mixins.targets($feat-structure) {
454-
// Set line-height to the height of input element excluding padding & border.
455-
line-height:
456-
$height
457-
- variables.$input-padding-top
458-
- variables.$input-padding-bottom
459-
- variables.$input-border-bottom;
442+
@if $height < variables.$minimum-height-for-filled-label {
443+
// Filled text fields must be tall enough to display a label
444+
&:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) {
445+
@include feature-targeting-mixins.targets($feat-structure) {
446+
.mdc-floating-label {
447+
display: none;
460448
}
461449
}
450+
451+
.mdc-text-field__input {
452+
@include input-no-label-padding_($query: $query);
453+
}
462454
}
463455
}
464456
}
@@ -741,6 +733,26 @@
741733

742734
// Baseline
743735

736+
@mixin input-padding_($query: feature-targeting-functions.all()) {
737+
$feat-structure: feature-targeting-functions.create-target($query, structure);
738+
739+
@include feature-targeting-mixins.targets($feat-structure) {
740+
padding:
741+
variables.$input-padding-top
742+
variables.$input-padding
743+
variables.$input-padding-bottom + variables.$input-border-bottom;
744+
}
745+
}
746+
747+
@mixin input-no-label-padding_($query: feature-targeting-functions.all()) {
748+
$feat-structure: feature-targeting-functions.create-target($query, structure);
749+
750+
@include feature-targeting-mixins.targets($feat-structure) {
751+
padding-top: 0;
752+
padding-bottom: variables.$input-border-bottom;
753+
}
754+
}
755+
744756
@mixin disabled_($query: feature-targeting-functions.all()) {
745757
$feat-structure: feature-targeting-functions.create-target($query, structure);
746758

@@ -1006,9 +1018,9 @@
10061018
}
10071019

10081020
.mdc-text-field__input {
1021+
@include outlined-input-padding_($query: $query);
10091022
@include feature-targeting-mixins.targets($feat-structure) {
10101023
display: flex;
1011-
padding: 12px 16px 14px;
10121024
border: none !important; // FF adds unwanted border in HC mode on windows.
10131025
background-color: transparent;
10141026
z-index: 1;
@@ -1026,6 +1038,14 @@
10261038
}
10271039
}
10281040

1041+
@mixin outlined-input-padding_($query: feature-targeting-functions.all()) {
1042+
$feat-structure: feature-targeting-functions.create-target($query, structure);
1043+
1044+
@include feature-targeting-mixins.targets($feat-structure) {
1045+
padding: 12px 16px 14px;
1046+
}
1047+
}
1048+
10291049
@mixin hover-outline-color_($color, $query: feature-targeting-functions.all()) {
10301050
&:not(.mdc-text-field--focused):hover {
10311051
.mdc-notched-outline {

packages/mdc-textfield/_variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ $textarea-disabled-background: rgba(249, 249, 249, 1) !default;
7373
$outlined-stroke-width: 2px !default;
7474
$height: 56px !default;
7575
$minimum-height: 40px !default;
76+
$minimum-height-for-filled-label: 52px !default;
7677
$maximum-height: $height !default;
7778
$density-scale: density-variables.$default-scale !default;
7879
$density-config: (

0 commit comments

Comments
 (0)