Skip to content

Add advanced option for custom message in preferences#1636

Merged
hovancik merged 2 commits into
trunkfrom
custom-pref-message
Sep 10, 2025
Merged

Add advanced option for custom message in preferences#1636
hovancik merged 2 commits into
trunkfrom
custom-pref-message

Conversation

@hovancik
Copy link
Copy Markdown
Owner

@hovancik hovancik commented Sep 9, 2025

No description provided.

@hovancik hovancik requested a review from Copilot September 9, 2025 15:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an advanced configuration option to display custom messages in the Preferences window, which is particularly useful for corporate installations where administrators might want to show information or instructions to users.

  • Added customPreferencesMessage setting to default configuration
  • Implemented display logic for custom messages in preferences UI
  • Added styling for the custom message display area

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/utils/defaultSettings.js Added new customPreferencesMessage setting with empty string default
app/preferences-renderer.js Added logic to display custom message and updated navigation handling
app/css/preferences.css Added styling for the custom message display area
README.md Added documentation for the new custom message feature
CHANGELOG.md Added entry for the new advanced option

Comment thread app/preferences-renderer.js Outdated
const toBeDisplayed =
document.querySelector(`.${event.target.closest('[data-section]').getAttribute('data-section')}`)
const toBeDisplayed = document.querySelector(`.${event.target.closest('[data-section]').getAttribute('data-section')}`)
document.querySelectorAll('body > div:not(.custom-message)').forEach(section => {
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

[nitpick] The selector hardcodes the .custom-message class which creates tight coupling. Consider using a data attribute or a more semantic approach to exclude the custom message from section hiding logic.

Suggested change
document.querySelectorAll('body > div:not(.custom-message)').forEach(section => {
document.querySelectorAll('body > div:not([data-exclude="true"])').forEach(section => {

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hovancik hovancik merged commit 970edef into trunk Sep 10, 2025
9 checks passed
@hovancik hovancik deleted the custom-pref-message branch September 10, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants