Remove Member Settings / Font / Text background color.

A colour painted behind the text needs elements to sit on, and neither choice
of them looks good. On the boxes - which is what it did, from <body> - it
painted the whole window: the board canvas and the empty space under the lists,
which is a page background and not a text background. On the elements that
actually carry text it striped every heading, menu row and paragraph with a
full-width band. A setting nobody can make look good is worse than no setting.

The wheel and its Unset button are gone from the popup, nothing reads
profile.uiTextBgColor, and no stylesheet rule paints it. A profile that already
has a colour is cleaned rather than left dormant: setUiColors unsets the field
on every call, whatever it is passed - and it still accepts the argument, so an
older client cannot fail against a newer server. The schema key stays declared
for exactly one reason: a modifier touching a key SimpleSchema does not know is
rejected, which would leave those profiles the only ones that could not be
cleaned.

The text colour beside it stays.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu committed 2026-08-14 18:20:31 +03:00
1 parent b19586eb72
commit b77a1663d8
7 files changed
+91 -103

No files matched your search

+12 -6
View File
@@ -586,9 +586,16 @@ Meteor.methods({
return null;
},
// #4759: set (or clear) the caller's custom UI text color and text background
// color. Each is validated as #rrggbb hex; a null/empty/invalid value unsets that
// color (back to default). Only strict hex ever reaches a CSS value.
// #4759: set (or clear) the caller's custom UI text color. Validated as
// #rrggbb hex; a null/empty/invalid value unsets it (back to default). Only
// strict hex ever reaches a CSS value.
//
// `bgColor` was the "text background color", which is REMOVED - no choice of
// elements to paint it on looked good. The parameter is still accepted, so an
// older client calling this cannot fail, and it is IGNORED: the field is
// unset on every call whatever is passed, so a colour stored before the
// removal is cleared the next time somebody touches this popup rather than
// sitting in the profile for ever.
async setUiColors(textColor, bgColor) {
if (!this.userId) throw new Meteor.Error('not-logged-in', 'User must be logged in');
check(textColor, Match.OneOf(String, null, undefined));
@@ -601,8 +608,7 @@ Meteor.methods({
const $unset = {};
if (isHexColor6(textColor)) $set['profile.uiTextColor'] = textColor;
else $unset['profile.uiTextColor'] = '';
if (isHexColor6(bgColor)) $set['profile.uiTextBgColor'] = bgColor;
else $unset['profile.uiTextBgColor'] = '';
$unset['profile.uiTextBgColor'] = '';
const modifier = {};
if (Object.keys($set).length) modifier.$set = $set;
@@ -610,7 +616,7 @@ Meteor.methods({
await Users.updateAsync(this.userId, modifier);
return {
textColor: $set['profile.uiTextColor'] || null,
bgColor: $set['profile.uiTextBgColor'] || null,
bgColor: null,
};
},