Pjb518 / FoundryVTT-Level-Up-Official

An official implementation of the Level Up: Advanced 5th Edition system for FoundryVTT.
MIT License
43 stars 17 forks source link

[Feat] Provide the ability to configure sheet colours #138

Open Pjb518 opened 1 year ago

Pjb518 commented 1 year ago

We should provide client settings for modifying the colours of the actor and item sheets. Some presets should be provided, and there should be a way for modules to register their own presets. This will be useful for modules that want to provide a thematic sheet option, for example.

This is currently being held up by a PR for Svelte here: https://github.com/sveltejs/svelte/pull/8275

This is in turn preventing a colour picker component making it into svelte-standard, which is a component library for TRL (the package we use to develop the system).

30 also needs to be completed before this issue can be started.

typhonrt commented 1 year ago

You can actually enable the color picker component now, but have to use an override for loading a forked version of Svelte and uncomment a line in svelte-standard to enable the export of the picker component.

Here is a pict of the location in node_modules under @typhonjs-fvtt/svelte-standard that you have to uncomment:

uncomment picker

Here is the override in package.json:

Svelte override

To get this to install correctly with an existing repo you probably should delete the node_modules folder and package-lock.json. Modify the package.json adding the override / removing svelte from dependencies. Run npm install then uncomment the line in svelte-standard to enable the color picker component.

I'll certainly post an update to TRL / svelte-standard once the container query PR gets merged into Svelte requiring the latest Svelte version and this will get things back to normal w/ just listing Svelte as a dependency.

I'm presently working on a theme-editor w/ CSS variable support and automatic serialization & import / export that may come in handy for your theming implementation. I should have that done in early April and glad to work with you to get that all squared away for your system.

Pjb518 commented 1 year ago

Thanks for info. If the Svelte PR stays on hold by time we get around to working on this, we'll definitely make use of the forked Svelte version.

Rather embarrassing that this ended up getting linked in the PR. I copied a full URL for the PR for information purposes, and GitHub, being too smart for its own good, realised that it could tie the two pages together 😄

typhonrt commented 1 year ago

I think it's fine in the PR.. Shows that people are interested in the feature; I wouldn't have seen it otherwise as I check up on the PR from time to time. Yeah you have to use `` when pasting URLs to make it a comment that doesn't get linked.

Using the color picker component and new theming support I'll be adding is probably best for Foundry v11 as the Electron client is getting an update for the latest release and that will support container queries. The v10 Electron client is still just a bit older Chromium version.

Pjb518 commented 1 year ago

Yeah, I just didn't even think about the fact it would link across repositories like that. Should have been obvious, really.

Anyway, I hope the PR gets merged in soon. We've been watching it closely for a little while now. 🤞