-
Notifications
You must be signed in to change notification settings - Fork 87
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
Enable the subtitle settings panel for the new layout #655
Changes from 13 commits
5ff17c4
ea9fc09
0c0e9fd
545e680
64dad45
6f21cbf
cf3ff8a
5530ae4
3461a30
d1ca093
ebd13e4
f2b581b
9fb9cc0
0d9e490
9c6c20f
9626fed
a0497f5
0dff63a
ad708ce
b2e0324
38f83ec
86ff8c6
93047fe
59a7bf5
ae1838a
901be17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
@import '../variables'; | ||
|
||
%ui-settings-panel-item { | ||
padding: .5em .7em; | ||
white-space: nowrap; | ||
|
||
cursor: pointer; | ||
* { | ||
cursor: pointer; | ||
} | ||
|
||
&:hover { | ||
background-color: transparentize($color-item-hover, .15); | ||
} | ||
|
||
&.#{$prefix}-hidden { | ||
display: none; | ||
} | ||
|
||
.#{$prefix}-container-wrapper { | ||
align-items: center; | ||
display: flex; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
> .#{$prefix}-container-wrapper { | ||
column-gap: 10px; | ||
} | ||
|
||
.#{$prefix}-ui-label { | ||
display: inline-block; | ||
font-size: .8em; | ||
font-weight: 500; | ||
margin: 0; | ||
text-align: justify; | ||
} | ||
|
||
.#{$prefix}-ui-label-setting-selected-option { | ||
align-self: center; | ||
font-weight: normal; | ||
margin-left: auto; | ||
width: fit-content; | ||
|
||
&::after { | ||
background-image: url('../../assets/skin-super-modern/images/angle-right.svg'); | ||
background-repeat: no-repeat; | ||
background-size: 1.5em auto; | ||
content: ' '; | ||
display: inline-block; | ||
height: 1.5em; | ||
vertical-align: -.4em; | ||
width: 1.5em; | ||
} | ||
} | ||
|
||
&.#{$prefix}-ui-settings-panel-item-select-option { | ||
&.#{$prefix}-selected { | ||
.#{$prefix}-ui-label { | ||
&::before { | ||
background-image: url('../../assets/skin-super-modern/images/check.svg'); | ||
background-repeat: no-repeat; | ||
background-size: 1.5em auto; | ||
content: ' '; | ||
display: inline-block; | ||
height: 1.5em; | ||
vertical-align: -.4em; | ||
width: 1.5em; | ||
} | ||
} | ||
} | ||
} | ||
|
||
&.#{$prefix}-title-item { | ||
border-bottom: 1px solid transparentize($color-item-hover, .15); | ||
} | ||
} | ||
|
||
.#{$prefix}-ui-settings-panel-item { | ||
@extend %ui-settings-panel-item; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,8 @@ export class Button<Config extends ButtonConfig> extends Component<Config> { | |
}).html(i18n.performLocalization(this.config.text))); | ||
|
||
// Listen for the click event on the button element and trigger the corresponding event on the button component | ||
buttonElement.on('click', () => { | ||
buttonElement.on('click', (e) => { | ||
e.stopPropagation(); | ||
Comment on lines
+74
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed to prevent the event from bubbling up to the parent element. Example: In the new design, the whole |
||
this.onClickEvent(); | ||
}); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,7 +339,7 @@ export class Component<Config extends ComponentConfig> { | |
* @param base configuration inherited from a superclass | ||
* @returns {Config} | ||
*/ | ||
protected mergeConfig<Config>(config: Config, defaults: Config, base: Config): Config { | ||
protected mergeConfig<Config>(config: Config, defaults: Partial<Config>, base: Config): Config { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not every component can fill all of its default config values. It does not need to fill out all as others are required anyway on initialization. To improve the type handling I decided to make this |
||
// Extend default config with supplied config | ||
let merged = Object.assign({}, base, defaults, config); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The styling for a settings-panel-item was extracted into a separate file.