mirror of
https://github.com/tabler/tabler.git
synced 2026-10-13 13:47:00 +04:00
Write the GitHub release body from the package changelogs (#2950)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
70f996bf77
commit
f07d46f970
10 files changed
+216
-3
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -0,0 +1,59 @@
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler/dev/.github/release-notes/1.5.0-cover-dark.png">
|
||||
<img alt="Tabler 1.5" src="https://raw.githubusercontent.com/tabler/tabler/dev/.github/release-notes/1.5.0-cover.png">
|
||||
</picture>
|
||||
|
||||
Tabler 1.5 is out. It's the biggest release we've done, with more than 250 changes across the framework, the demo pages and the docs. The sidebar folds now. Cards can have gradients, backgrounds can have patterns, charts got seven new types, and the demo comes with two new dashboards. Bootstrap also moved into the Tabler source tree, and that's where a lot of the smaller changes in this release come from.
|
||||
|
||||
## Folded sidebar
|
||||
|
||||
The vertical sidebar can fold down to a narrow strip of icons with `navbar-folded`. With `navbar-folded-hover` it stays folded and opens when you hover over it. Submenus open as flyouts next to the icon, and there's a pin toggle if you want to keep the sidebar open.
|
||||
|
||||
Two smaller things came with it. Section titles in the sidebar (`nav-section-title`) turn into short separators while it's folded, so you don't lose the grouping. And there's a new `navbar-footer` zone for the user block at the bottom. The navigation scrolls between the pinned brand and the pinned footer.
|
||||
|
||||
The sidebar is also light and `16rem` wide by default now.
|
||||
|
||||
## Layout settings
|
||||
|
||||
The theme panel does more than light and dark now. It also switches the layout, through four attributes you can set on `<html>` yourself: `data-bs-layout` for the container width (`default`, `fluid`, `boxed`), `data-bs-navbar-position` for whether the page shows the vertical or the horizontal navigation, `data-bs-navbar` for a sticky top bar, and `data-bs-navbar-theme` for coloring the navigation `dark` or `primary`. The folded sidebar has its own `data-bs-sidebar`.
|
||||
|
||||
The panel itself was redesigned around them, with an illustrated intro, color scheme presets and thumbnail tiles for most settings. A Customize entry in the sidebar footer and in the navbar opens it.
|
||||
|
||||
## Gradient cards
|
||||
|
||||
`.card-gradient` gives a card a gradient background. There are variants for each theme color, modifiers for the direction, and an animated version.
|
||||
|
||||
The gradient stops are plain utilities, so you can use them anywhere else too. `.bg-gradient-from-*`, `-via-*` and `-to-*` now also take `transparent` and `-inverted`.
|
||||
|
||||
There's a new Card gradients page in the demo with all the combinations.
|
||||
|
||||
## Background patterns
|
||||
|
||||
Backgrounds can have a pattern now. Dots, grids, stripes and a few more, through a set of `.bg-pattern-*` utilities.
|
||||
|
||||
You can also control how strong the pattern is. `--tblr-pattern-opacity-factor` scales the opacity globally, and `.bg-pattern-opacity-*` sets it per element.
|
||||
|
||||
## New chart types
|
||||
|
||||
Seven chart types joined the demo and the docs: radar, polar area, treemap, timeline, box plot, bubble and funnel. There's also a new Advanced charts page for the harder cases, with two y-axes, annotations, a zoom brush and synced chart groups.
|
||||
|
||||
Chart colors aren't hardcoded per chart any more. There's a `--tblr-chart-1` through `--tblr-chart-5` palette wired into the ApexCharts theme tokens, so charts generally follow the current color mode on their own. ApexCharts itself went from 3.54.1 to 7.0.0.
|
||||
|
||||
## New dashboard pages
|
||||
|
||||
Two dashboards joined the demo. One is a CRM dashboard built from reusable cards, the other a crypto dashboard with a portfolio overview, market data and order history.
|
||||
|
||||
There's also an onboarding page, a task list and a pay page, plus four new modals: change password, confirm delete, edit profile and new task.
|
||||
|
||||
## Upgrading
|
||||
|
||||
Bootstrap 5.3.8 now lives in the Tabler source tree as Sass modules and TypeScript components, so Tabler doesn't depend on the Bootstrap package any more. A few other things changed along the way:
|
||||
|
||||
- The npm package ships TypeScript declarations, so `import { Modal } from "@tabler/core"` is typed.
|
||||
- The default color mode is `auto` and follows the system setting.
|
||||
- Tabler doesn't bundle a web font any more. The default stack is the system one, so nothing gets downloaded.
|
||||
- Components accept `data-tblr-*` attributes next to `data-bs-*`.
|
||||
- The supported browsers are now Chrome 123, Firefox 128 and Safari 17.5, which is what the CSS actually needs.
|
||||
- The Turbo integration is gone, along with a number of unused Sass variables.
|
||||
|
||||
Every breaking change is in the [Upgrade to 1.5](https://docs.tabler.io/ui/getting-started/upgrade/) guide, with a before and after example for each one.
|
||||
@@ -0,0 +1,56 @@
|
||||
# Release notes
|
||||
|
||||
The release workflow writes the GitHub release body from two parts:
|
||||
|
||||
1. **The intro** — the file in this directory named after the version, for
|
||||
example `1.5.0.md`. It is optional. Write it before the `chore: update
|
||||
versions` pull request is merged, because the workflow reads it from the
|
||||
commit it publishes.
|
||||
2. **The changes** — `## Core changes`, `## Demo changes` and `## Docs
|
||||
changes`, built by `pnpm run release-notes` from the three `CHANGELOG.md`
|
||||
files. Never write these by hand.
|
||||
|
||||
A changeset that bumps several packages ends up in each of their changelogs, so
|
||||
the script shows every entry once: under Core if core is involved, otherwise
|
||||
under Demo, otherwise under Docs. The `Minor Changes` / `Patch Changes` split
|
||||
is dropped — each package gets one flat list.
|
||||
|
||||
The workflow also renames the release from `@tabler/core@1.5.0` to
|
||||
`Tabler v1.5.0`.
|
||||
|
||||
## What goes in the intro
|
||||
|
||||
Follow the earlier releases: a cover image, then one `##` section per headline
|
||||
feature with two to four sentences on what it gives the user, and a screenshot
|
||||
or a screen recording where it helps.
|
||||
|
||||
Images have to be reachable from GitHub. Either upload them to an issue comment
|
||||
first and paste the `user-attachments` URL, or commit them next to the intro and
|
||||
link them by their raw URL on `dev`:
|
||||
|
||||
```markdown
|
||||

|
||||
```
|
||||
|
||||
Link the branch, not the release tag: a tag like `@tabler/core@1.5.0` contains a
|
||||
slash, which `raw.githubusercontent.com` cannot tell apart from the file path.
|
||||
|
||||
For a cover that comes in both color modes, commit the two files and let GitHub
|
||||
pick:
|
||||
|
||||
```html
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tabler/tabler/dev/.github/release-notes/1.5.0-cover-dark.png">
|
||||
<img alt="Tabler 1.5" src="https://raw.githubusercontent.com/tabler/tabler/dev/.github/release-notes/1.5.0-cover.png">
|
||||
</picture>
|
||||
```
|
||||
|
||||
## Checking the result
|
||||
|
||||
`pnpm run release-notes` prints the body to stdout, so you can read it before
|
||||
the release goes out. Pass a path to write it to a file instead.
|
||||
|
||||
## Fixing a published release
|
||||
|
||||
Edit the release on GitHub. The workflow only writes the body once, right after
|
||||
it publishes, so a later push to `dev` will not overwrite your edit.
|
||||
@@ -53,3 +53,16 @@ jobs:
|
||||
run: |
|
||||
version=$(node -p "require('./core/package.json').version")
|
||||
gh release upload "@tabler/core@${version}" "packages-zip/tabler-${version}.zip" --clobber
|
||||
|
||||
# `changesets/action` names the release `@tabler/core@1.5.0` and fills it with
|
||||
# the raw changelog entry. Rename it to `Tabler v1.5.0` and replace the body with
|
||||
# the intro from `.github/release-notes/<version>.md` followed by the changes
|
||||
# grouped per package.
|
||||
- name: Write the release notes
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
version=$(node -p "require('./core/package.json').version")
|
||||
pnpm run release-notes "${RUNNER_TEMP}/release-body.md"
|
||||
gh release edit "@tabler/core@${version}" --title "Tabler v${version}" --notes-file "${RUNNER_TEMP}/release-body.md"
|
||||
Reference in new issue
Block a user