Skip to content

Commit

Permalink
2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorako committed Jul 20, 2023
1 parent 6c814d8 commit 72dccff
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 27 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.3.1

- (Refinement) Did a better job cleaning up the removal of the chat-height setting, which amongst other things caused the 'ux settings' header to disappear from settings. Note that the new 'sidebar resizer' functionality allows you to adjust the height of chatboxes by dragging from the top.
- (Refinement) Improved sidebar resizing functionality so it plays nicer with modules that need to know the width of the sidebar

# 2.3.0

- (Module) Added support for PF2e Utility Buttons (formerly flatcheck-helper)
Expand Down
2 changes: 1 addition & 1 deletion modules/misc-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ Hooks.on("renderSettingsConfig", (app, html, data) => {
$("<div>")
.addClass("form-group dorako-ui settings-header")
.html(i18n("pf2e-dorako-ui.settings.ux.name") + `<p class="notes">${i18n("pf2e-dorako-ui.settings.ux.hint")}</p>`)
.insertBefore($('[name="pf2e-dorako-ui.ux.chat-input-height"]').parents("div.form-group:first"));
.insertBefore($('[name="pf2e-dorako-ui.ux.restructure-card-info"]').parents("div.form-group:first"));
$("<div>")
.addClass("form-group dorako-ui settings-header")
.html(
Expand Down
4 changes: 0 additions & 4 deletions modules/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ Hooks.once("init", async () => {
const root = document.querySelector(":root").style;

root.setProperty("--avatar-size", game.settings.get("pf2e-dorako-ui", "avatar.size").toString() + "px");
root.setProperty(
"--chat-input-height",
game.settings.get("pf2e-dorako-ui", "ux.chat-input-height").toString() + "px"
);

util.debug("injected sheets");
});
Expand Down
9 changes: 5 additions & 4 deletions modules/sidebar-resizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ function _assignSidebarResizer(sidebar) {
// Perform the resize operation
function resize(e) {
newSize = Math.round(startSize + mouseStart - e.clientX);
const root = document.querySelector(":root");
if (newSize >= minSize) {
sidebar.style.setProperty("--sidebarWidth", `${newSize}px`);
root.style.setProperty("--sidebar-width", `${newSize}px`);
} else {
sidebar.style.setProperty("--sidebarWidth", `${minSize}px`);
root.style.setProperty("--sidebar-width", `${minSize}px`);
}
}

Expand Down Expand Up @@ -199,8 +200,8 @@ Hooks.once("renderSidebarTab", function () {
const storedSidebarWidth = window.localStorage.getItem("pf2e-dorako-ui.sidebar-width");
if (!storedSidebarWidth) return;
if (Number.isInteger(+storedSidebarWidth)) {
const sidebar = document.querySelector("#sidebar");
sidebar.style.setProperty("--sidebarWidth", `${storedSidebarWidth}px`);
const root = document.querySelector(":root");
root.style.setProperty("--sidebar-width", `${storedSidebarWidth}px`);
}
});

Expand Down
6 changes: 0 additions & 6 deletions sass/module/_dorako-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
/* ----------------------------------------- */

#sidebar {
--sidebarWidth: 300px;
width: var(--sidebarWidth);
& > .dorako-resize {
width: 6px;
height: 100%;
Expand Down Expand Up @@ -51,10 +49,6 @@
justify-content: center;
}

// #chat-form {
// flex: 0 0 var(--chat-input-height) !important; // Inline style overwrite
// }

#players.dorako-ui h3 {
border: none;
}
Expand Down
2 changes: 1 addition & 1 deletion sass/module/_module-management-plus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
background: none !important;
}

#module-management.dorako-ui .package-list .package .package-overview .tag.expand {
#module-management.dorako-ui.dark-theme .package-list .package .package-overview .tag.expand {
color: inherit;
background: inherit;
border: none;
Expand Down
4 changes: 0 additions & 4 deletions styles/legacy/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ nav.damage-log-nav.tabs {
}


#chat-form {
flex: 0 0 var(--chat-input-height);
}

#chat-form textarea {
max-height: var(--chat-input-height);
height: 100%;
Expand Down
8 changes: 2 additions & 6 deletions styles/module-support.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion styles/module-support.css.map

Large diffs are not rendered by default.

0 comments on commit 72dccff

Please sign in to comment.