Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tertiary text alignment and add width limit #355

Merged
merged 2 commits into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/css/components/_v-scroll-menu-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

div {
width: 100%;
height: 100%;
height: 85%;
display: flex;
flex-direction: column;
align-items: center;
Expand Down Expand Up @@ -65,6 +65,7 @@
flex: 0.5;
margin: auto;
align-self: flex-end;
max-width: 55px;

svg {
display: block;
Expand Down
60 changes: 32 additions & 28 deletions src/js/Controllers/DisplayCapabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ let textWithGraphicCapabilities = {
textField("subtleAlertSoftButtonText"),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -119,11 +119,11 @@ let textbuttonsWithGraphicCapabilities = {
textField("templateTitle", 50),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -185,11 +185,11 @@ let capabilities = {
textField("subtleAlertSoftButtonText"),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -260,11 +260,11 @@ let capabilities = {
textField("subtleAlertSoftButtonText"),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -335,11 +335,11 @@ let capabilities = {
textField("templateTitle", 50),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -389,11 +389,11 @@ let capabilities = {
textField("templateTitle", 50),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -444,11 +444,11 @@ let capabilities = {
textField("templateTitle", 50),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -484,11 +484,11 @@ let capabilities = {
textField("templateTitle", 50),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -537,11 +537,11 @@ let capabilities = {
textField("templateTitle", 50),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText"),
textField("tertiaryText", 20),
textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText")
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down Expand Up @@ -590,7 +590,11 @@ let capabilities = {
textField("subtleAlertSoftButtonText"),
textField("menuName"),
textField("secondaryText"),
textField("tertiaryText")
textField("tertiaryText", 20),
Copy link
Collaborator

Choose a reason for hiding this comment

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

good catch

textField("menuCommandSecondaryText"),
textField("menuCommandTertiaryText", 20),
textField("menuSubMenuSecondaryText"),
textField("menuSubMenuTertiaryText", 20)
],
"imageFields": [
imageField("choiceImage", 40),
Expand Down
12 changes: 6 additions & 6 deletions src/js/VScrollMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import {ReactComponent as IconArrowRight} from '../img/icons/icon-arrow-right.sv

export default class VScrollMenuItem extends React.Component {
render() {
let subMenuIndicator = this.props.menuID ? (
<span className="vscrollmenu-item__arrow svg-wrap" >
<IconArrowRight/>
</span>
) : null;
let subMenuIndicatorStyle = this.props.menuID ? null : ({
display: "none"
});

var classString = "vscrollmenu-item th-b-color th-bb-color-secondary";

Expand Down Expand Up @@ -52,7 +50,9 @@ export default class VScrollMenuItem extends React.Component {
<p className="t-small t-light th-f-color-secondary t-oneline">{tertiaryText}</p>
</div>

{subMenuIndicator}
<span className="vscrollmenu-item__arrow svg-wrap" >
<IconArrowRight style={subMenuIndicatorStyle}/>
</span>
</div>
</Link>
)
Expand Down