feat: search field of the history panel stands out (recess, focus border, magnifier)
Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
1 parent
44521e478d
commit
02d579c8b8
4 files changed
+87
No files matched your search
@@ -144,3 +144,24 @@ test("isManualResize: a height nobody ordered is the person's drag", () => {
|
||||
assert.equal(isManualResize({ reportedPx: 150, orderedPx: null }), false);
|
||||
assert.equal(isManualResize({ reportedPx: NaN, orderedPx: 200 }), false);
|
||||
});
|
||||
|
||||
import { luminance, fieldBackground } from "../mod/ovis-composer/view.js";
|
||||
|
||||
test("luminance: black is darker than grey is darker than white; alpha and rubbish are tolerated", () => {
|
||||
assert.ok(luminance("#000000") < luminance("#808080"));
|
||||
assert.ok(luminance("#808080") < luminance("#ffffff"));
|
||||
assert.equal(luminance("#000000ff"), luminance("#000000"));
|
||||
assert.equal(luminance("#fff"), luminance("#ffffff"));
|
||||
assert.equal(luminance("red"), null);
|
||||
assert.equal(luminance(undefined), null);
|
||||
});
|
||||
|
||||
test("fieldBackground: the darkest color the theme has, darker than the panel", () => {
|
||||
const theme = { popover: "#2a2c31", background: "#101114", canvas: "#16171a", raised: "#202226", chrome: "#1b1c20" };
|
||||
assert.equal(fieldBackground(theme, theme.popover), "#101114");
|
||||
// a theme where the background is lighter than another color: that one wins
|
||||
assert.equal(fieldBackground({ ...theme, background: "#3a3c41", canvas: "#0c0d0f" }, theme.popover), "#0c0d0f");
|
||||
// nothing valid: the panel's own color
|
||||
assert.equal(fieldBackground({}, "#2a2c31"), "#2a2c31");
|
||||
assert.equal(fieldBackground({ background: "nope" }, "#2a2c31"), "#2a2c31");
|
||||
});
|
||||
Reference in new issue
Block a user