<!-- Please read https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before submitting your pull request --> ### Description <!-- Please include a summary of the change. Please also include relevant motivation and context. List any dependencies that are required for this change. --> Pulls themes and tweaks from https://github.com/SableClient/themes and allows basic searching and filtering in the themes settings. Migration modal should work fine, prompts the user to either enable fetching from github or disable it and be limited to the built-in light/dark themes. Theme links that end in *.preview.sable.css from the official repo will generate embeds, optional setting to allow generating embeds for any *.preview.sable.css file. In chat previews are generated with extracted css values and are safe from injection. Full theme files will load the entire file, and are vulnerable to injection, hence the official safe repo. Third party themes sent in chat show a prominent banner making the risks clear. Todo: - ~~More clarity in settings menu when github fetching themes are disabled (right now it just has a browse button that immediately enables it, no confirmation or explanation)~~ updated labels and added confirmation - ~~Improve UI ?~~ consolidated card styling Maybe worth adding in the future but out of scope for the time being: - Info icon or some way to link to theme sources. Mitigates #492 ? Fixes #71 Fixes #617 (via tweak in theme repo) <img width="500" alt="image" src="https://github.com/user-attachments/assets/3c97eb4c-0c3b-4b68-8ba5-132e1585ad1e" /> <img width="500" alt="image" src="https://github.com/user-attachments/assets/600ce518-aba4-4679-8bf7-ed541587ac9a" /> #### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change - disables themes, but there's a migration modal that prompts the user with 1 click to redownload and enable their existing theme(s). - [x] This change requires a documentation update ### Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings ### AI disclosure: - [x] Partially AI assisted (clarify which code was AI assisted and briefly explain what it does). - [ ] Fully AI generated (explain what all the generated code does in moderate detail). <!-- Write any explanation required here, but do not generate the explanation using AI!! You must prove you understand what the code in this PR does. --> AI was used to write the code for parsing and extracting data from the raw css files/links and dynamically populate the lists as well as develop the migration system for current themes. Tests were AI generated. All code has (or will be) thoroughly reviewed by me by the time this PR is ready.
Sable
A Matrix client built to enhance the user experience with quality-of-life features, cosmetics, utilities, and sheer usability. See the changelog.
Soon to be replaced desktop apps can be downloaded here. They auto-update by pulling the website.
Join our matrix space here to discuss features, issues, or meowing.
Forked from Cinny.
Getting started
The web app is available at app.sable.moe and gets updated on frequently, as soon as a feature is deemed stable.
You can also download our desktop app for windows and linux from releases.
Self-hosting
You have a few options for self hosting, you can:
- Run the prebuilt docker container.
- Deploy on a site like GitLab Pages. Jae has a guide here.
- Build it yourself.
Docker
Prebuilt images are published to ghcr.io/sableclient/sable.
latesttracks the currentdevbranch image.X.Y.Ztags are versioned releases.X.Ytags float within a release line.- Pushes to
devalso publish a short commit SHA tag.
Run the latest image with:
docker run --rm -p 8080:8080 ghcr.io/sableclient/sable:latest
Then open http://localhost:8080.
If you want to override the bundled config.json, mount your own
file at /app/config.json:
services:
sable:
image: ghcr.io/sableclient/sable:latest
ports:
- '8080:8080'
volumes:
- ./config.json:/app/config.json:ro
Build it yourself
To build and serve Sable yourself with nginx, clone this repo and build it:
pnpm i # Installs all dependencies
pnpm run build # Compiles the app into the dist/ directory
After that, you can copy the dist/ directory to your server and serve it.
-
In the
config.json, you can modify the default homeservers, feature rooms/spaces, toggle the account switcher, and toggle experimental simplified slilding sync support. -
To deploy on subdirectory, you need to rebuild the app youself after updating the
basepath inbuild.config.ts.- For example, if you want to deploy on
https://sable.moe/app, then setbase: '/app'.
- For example, if you want to deploy on
Local development
Tip
We recommend using a version manager as versions change quickly. fnm is a great cross-platform option (Windows, macOS, and Linux). NVM on Windows and nvm on Linux/macOS are also good choices. Use the version defined in
.node-version.
Execute the following commands to start a development server:
fnm use --corepack-enabled # Activates the Node version and enables corepack
# If you not using fnm, install corepack manually: npm install --global corepack@latest
corepack install # Installs the pnpm version specified in package.json
pnpm i # Installs all dependencies
pnpm run dev # Serve a development version
To build the app:
pnpm run build # Compiles the app into the dist/ directory
Deployment and infrastructure
Deployment workflows and infrastructure details live in
infra/README.md.