Skip to content

Commit

Permalink
Fix regression where the markdown rendering parameter of various TUI …
Browse files Browse the repository at this point in the history
…calls were missing, causing broken menus (notably the save-for-later container resolution panel); fix regression where the `<all_urls>` host permission request panel had overlapping text blocks
  • Loading branch information
Bill13579 committed Sep 10, 2024
1 parent 23cba20 commit 46e56ab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 4 additions & 3 deletions dist/popup/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ input[type="text"]:focus {
}
.-tui-menu-item {
display: inline-flex;
height: calc(24px * var(--scale));
line-height: calc(26px * var(--scale));
min-height: calc(24px * var(--scale));
line-height: calc(24px * var(--scale));
padding-left: 4px;
padding-right: calc(2px + 4.5px);
/* padding-right: calc(8px + 4.5px); */
Expand All @@ -243,7 +243,8 @@ input[type="text"]:focus {
background-color: var(--bg-lite);
}
.-tui-menu-item .-tui-menu-item-icon {
height: 100%;
/* height: 100%; */
align-self: stretch; /* Alternative to height: 100% in this situation */
width: calc(24px * var(--scale));
vertical-align: middle;

Expand Down
6 changes: 3 additions & 3 deletions src/popup/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class TUIMenu extends TUIMenuListLayout {
}
}
export class TUIMenuItem {
constructor(label="Label", icon="", iconTransform="scale(80%) translateY(-2.8%)", markdown=false, data=undefined) {
constructor(label="Label", icon="", iconTransform="scale(80%) translateY(-4.5%)", markdown=false, data=undefined) {
this.__labelText = label;
this.__iconSrc = icon;
this.iconTransform = iconTransform;
Expand Down Expand Up @@ -242,7 +242,7 @@ export class TUIMenuItem {
}
}
export class TUIMenuLabel extends TUIMenuItem {
constructor(label="Label", icon="", iconTransform="scale(80%) translateY(-2.8%)", markdown=false, data=undefined) {
constructor(label="Label", icon="", iconTransform="scale(80%) translateY(-4.5%)", markdown=false, data=undefined) {
super(label, icon, iconTransform, markdown, data);
}
make(ret) {
Expand All @@ -267,7 +267,7 @@ export class TUIMenuHR {
}
}
export class TUISubMenu extends TUIMenuItem {
constructor(onMake, onSelect, options, dropdown=false, label="Label", icon="", iconTransform="scale(80%) translateY(-2.8%)", markdown=false, data=undefined) {
constructor(onMake, onSelect, options, dropdown=false, label="Label", icon="", iconTransform="scale(80%) translateY(-4.5%)", markdown=false, data=undefined) {
super(label, icon, iconTransform, markdown, data);
this.__onMake = onMake;
this.__onSelect = onSelect;
Expand Down
6 changes: 3 additions & 3 deletions src/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@ class TUITabsList extends TUIListDataInterpret {
let generateDropdownOptions = function () {
let options = [];
for (let ci of currentCI) {
options.push(new TUIMenuItem(ci.name, ci.iconUrl, undefined, {
options.push(new TUIMenuItem(ci.name, ci.iconUrl, undefined, undefined, {
colorCode: ci.colorCode,
cookieStoreId: ci.cookieStoreId
}));
Expand All @@ -2209,7 +2209,7 @@ class TUITabsList extends TUIListDataInterpret {
new TUIMenuListLayout(
...Object.entries(map).filter(([key, value]) => value === undefined).map(([key, value]) =>
new TUIMenuFlexLayout(
new TUIMenuLabel(savedCIIdMap[key].name, savedCIIdMap[key].iconUrl, undefined, {
new TUIMenuLabel(savedCIIdMap[key].name, savedCIIdMap[key].iconUrl, undefined, undefined, {
colorCode: savedCIIdMap[key].colorCode
}).pushInto(labels),
new TUISubMenu((_, options) => {
Expand All @@ -2222,7 +2222,7 @@ class TUITabsList extends TUIListDataInterpret {
if (Object.values(map).every(value => value !== undefined)) {
ok.enabled = true;
}
}, generateDropdownOptions(), true, "Select...", "", undefined, { initialSelection: value ? ciIndex(value) : -1 }).pushInto(dropdowns)
}, generateDropdownOptions(), true, "Select...", "", undefined, undefined, { initialSelection: value ? ciIndex(value) : -1 }).pushInto(dropdowns)
).pushInto(rows))
),
actions = new TUIMenuFlexLayout(
Expand Down

0 comments on commit 46e56ab

Please sign in to comment.