Skip to content

Commit

Permalink
GH-2447 - Updating label overflow (#2479)
Browse files Browse the repository at this point in the history
* GH-2447 - Updating label overflow

* Updating labels css
  • Loading branch information
asaadmahmood authored Mar 10, 2022
1 parent 61f1a3c commit 923437c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 31 deletions.
84 changes: 54 additions & 30 deletions webapp/src/components/cardDetail/cardDetail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,64 @@
width: 100%;
}



.octo-propertyvalue {
font-size: 14px;
padding: 4px 8px;
min-height: 32px;
display: flex;

&:not(.URLProperty) {
flex-wrap: wrap;
}

&.octo-propertyvalue--readonly {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

&:not(.readonly) {
min-width: 180px;
transition: background 100ms ease-out 0s;
cursor: pointer;
border-radius: 4px;

&:hover {
background-color: rgba(var(--center-channel-color-rgb), 0.08);
}
}

.MenuWrapper {
display: flex;
align-items: center;
}
}

.ValueSelector {
padding: 4px 0;
background-color: rgba(var(--center-channel-color-rgb), 0.08);
}

.ValueSelector__menu {
max-width: 100%;

.value-menu-option {
justify-content: space-between;
}

.label-container {
max-width: 90%;
}
}

.octo-propertyrow {
max-width: 595px;
display: flex;
align-items: center;
align-items: flex-start;
margin: 6px 0;
height: 32px;
min-height: 32px;

.Switch {
margin-left: 8px;
Expand All @@ -54,34 +106,6 @@
}
}

.octo-propertyvalue {
font-size: 14px;
padding: 4px 8px;
height: 32px;

&.octo-propertyvalue--readonly {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

&:not(.readonly) {
min-width: 180px;
transition: background 100ms ease-out 0s;
cursor: pointer;
border-radius: 4px;

&:hover {
background-color: rgba(var(--center-channel-color-rgb), 0.08);
}
}

.MenuWrapper {
display: flex;
align-items: center;
}
}

.Label {
margin: 0 4px 0 0;
}
Expand Down
1 change: 1 addition & 0 deletions webapp/src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ html {
/*-- Property list --*/

.octo-propertyvalue {
max-width: 100%;
font-size: 12px;
color: rgb(var(--center-channel-color-rgb));

Expand Down
4 changes: 3 additions & 1 deletion webapp/src/widgets/label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
display: inline-flex;
align-items: center;
padding: 2px 8px;
margin-right: 5px;
margin: 4px 4px 0 0;
border-radius: 3px;
line-height: 20px;
color: rgba(var(--center-channel-color-rgb), 0.8);
white-space: nowrap;
text-transform: uppercase;
overflow: hidden;
font-weight: 600;
font-size: 13px;
max-width: 100%;

&.empty {
color: rgba(var(--center-channel-color-rgb), 0.4);
Expand Down
1 change: 1 addition & 0 deletions webapp/src/widgets/valueSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ function ValueSelector(props: Props): JSX.Element {
/>
)}
className='ValueSelector'
classNamePrefix='ValueSelector'
options={props.options}
getOptionLabel={(o: IPropertyOption) => o.value}
getOptionValue={(o: IPropertyOption) => o.id}
Expand Down

0 comments on commit 923437c

Please sign in to comment.