Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90f1239fba | ||
|
|
b2fe1cb1e0 | ||
|
|
065a879190 | ||
|
|
89882b4863 |
@@ -139,6 +139,23 @@ jobs:
|
|||||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Nor is a prerelease, and this trigger is `v*`, which matches
|
||||||
|
# `v0.4.0-beta.1`. Two reasons it is worst here. The APK goes
|
||||||
|
# to the *generic* registry, which is readable without
|
||||||
|
# credentials so Obtainium can poll a plain URL — a beta would
|
||||||
|
# be offered to every device on it. And the versionCode maths
|
||||||
|
# below splits on dots and would read "1" out of "0-beta",
|
||||||
|
# producing a code that is wrong rather than a build that
|
||||||
|
# fails: Android orders releases by that integer and refuses
|
||||||
|
# anything not greater than what is installed.
|
||||||
|
case "$v" in
|
||||||
|
*-*)
|
||||||
|
echo "v$v is a prerelease; not publishing an APK for it"
|
||||||
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
# Android orders releases by an integer and refuses anything
|
# Android orders releases by an integer and refuses anything
|
||||||
|
|||||||
@@ -72,6 +72,22 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# A prerelease is not a shipment either, and this trigger is
|
||||||
|
# `v*` — which matches `v0.4.0-beta.1`. Nothing produces one
|
||||||
|
# today; the guard is here because the thing that would is
|
||||||
|
# semantic-release's `prerelease: true` channel, a one-line
|
||||||
|
# change in .releaserc.yml whose blast radius is four public
|
||||||
|
# package channels. Same argument as release.yml's
|
||||||
|
# `chore(release):` guard: cheap, against something a future
|
||||||
|
# edit turns on somewhere else entirely.
|
||||||
|
case "$v" in
|
||||||
|
*-*)
|
||||||
|
echo "$v is a prerelease; not packaging it for pacman"
|
||||||
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "tag=$v" >> "$GITHUB_OUTPUT"
|
echo "tag=$v" >> "$GITHUB_OUTPUT"
|
||||||
echo "building $v"
|
echo "building $v"
|
||||||
|
|||||||
@@ -95,6 +95,19 @@ jobs:
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Nor is a prerelease, and this trigger is `v*`, which matches
|
||||||
|
# `v0.4.0-beta.1`. The mildest of the four — assets attach to
|
||||||
|
# the prerelease's own Gitea release and no package manager
|
||||||
|
# reads them — but four workflows sharing one trigger should
|
||||||
|
# share one answer about what a shipment is.
|
||||||
|
case "$v" in
|
||||||
|
*-*)
|
||||||
|
echo "$v is a prerelease; not attaching desktop assets"
|
||||||
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "tag=$v" >> "$GITHUB_OUTPUT"
|
echo "tag=$v" >> "$GITHUB_OUTPUT"
|
||||||
echo "version=${v#v}" >> "$GITHUB_OUTPUT"
|
echo "version=${v#v}" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
@@ -56,6 +56,18 @@ jobs:
|
|||||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Nor is a prerelease, and this trigger is `v*`, which matches
|
||||||
|
# `v0.4.0-beta.1`. It matters most here of the four: the tap
|
||||||
|
# is public, and `brew upgrade` would offer a beta to everyone
|
||||||
|
# on it.
|
||||||
|
case "$VERSION" in
|
||||||
|
*-*)
|
||||||
|
echo "$TAG is a prerelease; not syncing it to a public tap"
|
||||||
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
TARBALL="${SOURCE_TARBALL_BASE}/${TAG}.tar.gz"
|
TARBALL="${SOURCE_TARBALL_BASE}/${TAG}.tar.gz"
|
||||||
|
|||||||
@@ -1,11 +1,36 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
# The sixth workflow, and the one that decides whether the other three
|
# The sixth workflow, and the one that decides whether the other three
|
||||||
# run at all. On every push to main it reads the Conventional Commits
|
# run at all. It reads the Conventional Commits since the last tag, and
|
||||||
# since the last tag, and if any of them is releasable it writes the
|
# if any of them is releasable it writes the changelog, pushes the tag,
|
||||||
# changelog, pushes the tag, and creates the Gitea release whose body is
|
# and creates the Gitea release whose body is that changelog section.
|
||||||
# that changelog section. The publishing workflows are keyed on `v*`, so
|
# The publishing workflows are keyed on `v*`, so the tag push is what
|
||||||
# the tag push is what starts them.
|
# starts them.
|
||||||
|
#
|
||||||
|
# **It is triggered by hand, and there is deliberately no `push`
|
||||||
|
# trigger.** There was one, on `main`, which made the trigger "a PR was
|
||||||
|
# merged" and nothing else: eight releases in twenty-two hours
|
||||||
|
# (v0.0.1 -> v0.3.1) for one session's work, each fanning out to four
|
||||||
|
# publishers on a runner with capacity 1, so ~40 packaging jobs shipped
|
||||||
|
# three issues and ordinary PR CI queued behind them. A version per
|
||||||
|
# merged PR is a version per unit of *work*, not per *shipment*, and
|
||||||
|
# pacman, Homebrew and Obtainium see every one.
|
||||||
|
#
|
||||||
|
# Nothing else had to change to batch them: semantic-release already
|
||||||
|
# reads every commit since the last tag, so five fixes and two feats
|
||||||
|
# become one minor release with all seven in the notes. Release
|
||||||
|
# frequency was only ever how often this file fired.
|
||||||
|
#
|
||||||
|
# This is the rule `index-artifact.yml` states and is the other instance
|
||||||
|
# of: **a job that mutates state which cannot be rebuilt in ten minutes
|
||||||
|
# is triggered deliberately, not by a push.** A release here is a tag,
|
||||||
|
# a Gitea release, an Arch package, a Homebrew formula, a signed APK and
|
||||||
|
# desktop assets — and an Android version going backwards costs the user
|
||||||
|
# their library (docs/android-release.md).
|
||||||
|
#
|
||||||
|
# A schedule was considered and rejected: a cron batches without anyone
|
||||||
|
# having to remember, but it puts the decision back on a timer, which is
|
||||||
|
# the thing being removed.
|
||||||
#
|
#
|
||||||
# **Why the tag is pushed with PACKAGE_TOKEN and not the Actions token.**
|
# **Why the tag is pushed with PACKAGE_TOKEN and not the Actions token.**
|
||||||
# Gitea, like GitHub, does not start a workflow from a ref pushed by a
|
# Gitea, like GitHub, does not start a workflow from a ref pushed by a
|
||||||
@@ -19,9 +44,12 @@ name: Release
|
|||||||
# instead.
|
# instead.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
dry_run:
|
||||||
|
description: "Report what would be released and stop"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
|
||||||
# Cutting a tag is not a thing to cancel halfway: a superseded run must
|
# Cutting a tag is not a thing to cancel halfway: a superseded run must
|
||||||
# finish, not be killed between `git push --tags` and the release POST.
|
# finish, not be killed between `git push --tags` and the release POST.
|
||||||
@@ -163,14 +191,32 @@ jobs:
|
|||||||
# been right, the tag would have been right, every job would have
|
# been right, the tag would have been right, every job would have
|
||||||
# been green, and the release body would have been empty. Check the
|
# been green, and the release body would have been empty. Check the
|
||||||
# notes, not the exit code, before moving any of these.
|
# notes, not the exit code, before moving any of these.
|
||||||
|
# The point of a manual trigger is deliberateness, and deliberate
|
||||||
|
# means being able to look before pulling the lever. `--dry-run`
|
||||||
|
# reports the version and the notes and writes nothing: no tag, no
|
||||||
|
# release, no publishers. `make release-dry` is the same answer
|
||||||
|
# locally; this is it from the runner, against the same commit and
|
||||||
|
# the same tag history, which is what actually decides.
|
||||||
- name: Run semantic-release
|
- name: Run semantic-release
|
||||||
if: steps.guard.outputs.skip == 'false'
|
if: steps.guard.outputs.skip == 'false'
|
||||||
working-directory: /src
|
working-directory: /src
|
||||||
|
env:
|
||||||
|
DRY_RUN: ${{ inputs.dry_run }}
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
git config user.name "yellowjacket-ci"
|
git config user.name "yellowjacket-ci"
|
||||||
git config user.email "yj@yellowjacket.app"
|
git config user.email "yj@yellowjacket.app"
|
||||||
|
|
||||||
|
# Anything but a literal "true" releases for real. A typo in a
|
||||||
|
# dispatch box must not silently turn a shipment into a no-op
|
||||||
|
# that reports success — the failure worth avoiding is the one
|
||||||
|
# where nothing happens and the run is green.
|
||||||
|
dry=""
|
||||||
|
if [ "${DRY_RUN:-false}" = "true" ]; then
|
||||||
|
echo "DRY RUN — no tag will be pushed and no release created"
|
||||||
|
dry="--dry-run"
|
||||||
|
fi
|
||||||
|
|
||||||
npx --yes \
|
npx --yes \
|
||||||
-p semantic-release@25 \
|
-p semantic-release@25 \
|
||||||
-p @semantic-release/commit-analyzer@13 \
|
-p @semantic-release/commit-analyzer@13 \
|
||||||
@@ -178,5 +224,5 @@ jobs:
|
|||||||
-p @semantic-release/changelog@7 \
|
-p @semantic-release/changelog@7 \
|
||||||
-p @semantic-release/exec@7 \
|
-p @semantic-release/exec@7 \
|
||||||
-p conventional-changelog-conventionalcommits@9 \
|
-p conventional-changelog-conventionalcommits@9 \
|
||||||
semantic-release \
|
semantic-release $dry \
|
||||||
--repository-url "https://x-access-token:${PACKAGE_TOKEN}@${SERVER_URL#https://}/${REPO}.git"
|
--repository-url "https://x-access-token:${PACKAGE_TOKEN}@${SERVER_URL#https://}/${REPO}.git"
|
||||||
|
|||||||
+14
-3
@@ -1,8 +1,19 @@
|
|||||||
# semantic-release configuration.
|
# semantic-release configuration.
|
||||||
#
|
#
|
||||||
# Runs on pushes to main from .gitea/workflows/release.yml: determine the
|
# Run by hand from .gitea/workflows/release.yml, which has no push
|
||||||
# version from the Conventional Commits since the last tag, write the
|
# trigger: determine the version from the Conventional Commits since the
|
||||||
# changelog, commit it, push the tag, and create the Gitea release.
|
# last tag, write the changelog, push the tag, and create the Gitea
|
||||||
|
# release. A release is a shipment rather than a merge, and the commits
|
||||||
|
# accumulate until someone says so -- this file needs to know nothing
|
||||||
|
# about that, because reading everything since the last tag is what it
|
||||||
|
# already did.
|
||||||
|
#
|
||||||
|
# `branches` is main and only main. A `prerelease: true` channel is the
|
||||||
|
# obvious next edit here and is the one to think twice about: all four
|
||||||
|
# publishing workflows trigger on `v*`, which matches `v0.4.0-beta.1`.
|
||||||
|
# They carry a prerelease guard now, so the failure is a clean skip
|
||||||
|
# rather than a beta in a public tap -- but they are four separate files
|
||||||
|
# and this is the line that would turn them on.
|
||||||
#
|
#
|
||||||
# **There is no `@semantic-release/github` plugin here and there must not
|
# **There is no `@semantic-release/github` plugin here and there must not
|
||||||
# be.** Gitea's API is `/api/v1` and is not GitHub's surface. The Gitea
|
# be.** Gitea's API is `/api/v1` and is not GitHub's surface. The Gitea
|
||||||
|
|||||||
+10
-5
@@ -5,15 +5,20 @@ The changelog is the releases page:
|
|||||||
<https://git.ljones.me/yonlu/yellowjacket/releases>
|
<https://git.ljones.me/yonlu/yellowjacket/releases>
|
||||||
|
|
||||||
Every release there is generated from the Conventional Commits it
|
Every release there is generated from the Conventional Commits it
|
||||||
contains, by `.gitea/workflows/release.yml` on merge to `main`. Each one
|
contains, by `.gitea/workflows/release.yml`. Each one carries its notes
|
||||||
carries its notes as its body, grouped by change type, with a link to the
|
as its body, grouped by change type, with a link to the commit behind
|
||||||
commit behind every line.
|
every line.
|
||||||
|
|
||||||
|
That workflow is **run by hand**, so a release holds everything merged
|
||||||
|
since the last one rather than one PR's worth. It used to fire on every
|
||||||
|
push to `main`, which made a version per merged PR (issue #115).
|
||||||
|
|
||||||
**This file is not generated and is not a copy of that.** `main` is a
|
**This file is not generated and is not a copy of that.** `main` is a
|
||||||
protected branch, so nothing pushes a changelog commit back to it — and a
|
protected branch, so nothing pushes a changelog commit back to it — and a
|
||||||
file that claimed to be a changelog while silently never updating would
|
file that claimed to be a changelog while silently never updating would
|
||||||
be worse than no file at all. `make release-dry` prints what the next
|
be worse than no file at all. `make release-dry` prints what a release
|
||||||
merge would release.
|
run would cut right now, and the workflow's own `dry_run` input answers
|
||||||
|
the same question from CI.
|
||||||
|
|
||||||
History before `v0.0.1` is in `git log`. The versions before it were cut
|
History before `v0.0.1` is in `git log`. The versions before it were cut
|
||||||
by hand and are not on the releases page; the entries this file used to
|
by hand and are not on the releases page; the entries this file used to
|
||||||
|
|||||||
@@ -1448,6 +1448,52 @@ is therefore **reported at runtime** to `window.__yjIconMisses` and
|
|||||||
drawn as a fallback — an e2e sweep asserts there are none — since a
|
drawn as a fallback — an e2e sweep asserts there are none — since a
|
||||||
missing icon used to be impossible, the CDN having had everything.
|
missing icon used to be impossible, the CDN having had everything.
|
||||||
|
|
||||||
|
**What each icon *means* is a second table, and it is
|
||||||
|
`utils/icon-language.ts`.** Bundling answers "does this name resolve";
|
||||||
|
nothing answered "does this name mean what the one next to it means",
|
||||||
|
and a wrong-but-real icon renders perfectly. So `plus` came to mean add
|
||||||
|
to the queue, add to a playlist, make a new playlist **and** you do not
|
||||||
|
own this — the first two *adjacent in the same context menu* — while
|
||||||
|
`list` meant the queue, the Playlists destination and adding to the
|
||||||
|
queue.
|
||||||
|
|
||||||
|
The rule the table is built on: **an icon names the noun it acts on,
|
||||||
|
not the verb.** "Add to queue" and "add to playlist" are one verb on
|
||||||
|
two nouns, so the noun is what has to differ — which is why adding to a
|
||||||
|
playlist wears the Playlists destination's own icon, and why the queue
|
||||||
|
got `bars-staggered` and stopped wearing Playlists'. `plus` keeps the
|
||||||
|
one meaning it is unambiguous about, making something that is not there
|
||||||
|
yet.
|
||||||
|
|
||||||
|
Four things about it are load-bearing:
|
||||||
|
|
||||||
|
- **The request toggle is one glyph in two weights**
|
||||||
|
(`regular/bookmark` → `solid/bookmark`), because two states of a
|
||||||
|
toggle have to read as each other's opposite and a plus against a
|
||||||
|
bookmark does not. The pair was *already in the app and already
|
||||||
|
right* on `explore-album-details`'s "Request this" button while the
|
||||||
|
badge forty pixels away showed a plus — `utils/library-status.ts`'s
|
||||||
|
fault one layer down, having made the two agree on what wanting means
|
||||||
|
and left them disagreeing on what it looks like.
|
||||||
|
- **Downloads keeps the solid bookmark, deliberately.** That is the
|
||||||
|
same word twice, not two words: the badge says "this is on your
|
||||||
|
list" and the nav item is that list.
|
||||||
|
- **`icon-language.test.ts` sweeps the source**, because the rule is
|
||||||
|
about every call site and checking one checks nothing — the same
|
||||||
|
shape as `TestNoDirectRuntimeEmits`. It reads every `src/**/*.ts` as
|
||||||
|
raw text and fails on a literal `name="plus"` or `icon: 'list'`
|
||||||
|
outside the table, and its **first assertion is that it read
|
||||||
|
anything at all**, since a sweep over an empty glob passes.
|
||||||
|
- **It also asserts every `ICON_*` is bundled**, which closes the loop
|
||||||
|
the runtime cannot: `bookmark-check` is Font Awesome **Pro** and sat
|
||||||
|
on `explore-artist-details`'s Follow button, drawn for every followed
|
||||||
|
artist as a circled question mark. `offline-icons.spec.ts` sweeps
|
||||||
|
`__yjIconMisses` and could not see it, because no spec had ever
|
||||||
|
followed an artist — the same fault `requested-badge.spec.ts` was
|
||||||
|
written for, one component over, still live. A name computed from
|
||||||
|
state was only checkable from the state; now it is checkable from the
|
||||||
|
table.
|
||||||
|
|
||||||
**An album page says how much of the album is yours.**
|
**An album page says how much of the album is yours.**
|
||||||
`explore-album-details` is a *catalog* page and there is no
|
`explore-album-details` is a *catalog* page and there is no
|
||||||
library-side album detail page at all, so the album on it may be
|
library-side album detail page at all, so the album on it may be
|
||||||
@@ -2263,13 +2309,53 @@ those run at all; `unclaim.yml` is housekeeping on the tracker and
|
|||||||
touches no code; only `ci.yml` gates, and it is the one to look at when
|
touches no code; only `ci.yml` gates, and it is the one to look at when
|
||||||
deciding whether a push was healthy.
|
deciding whether a push was healthy.
|
||||||
|
|
||||||
**`release.yml` is the entry point for all of it.** On every push to
|
**`release.yml` is the entry point for all of it, and it is triggered by
|
||||||
`main` it reads the Conventional Commits since the last tag and, if any
|
hand.** It reads the Conventional Commits since the last tag and, if any
|
||||||
is releasable, writes the changelog, pushes the tag and creates the Gitea
|
is releasable, writes the changelog, pushes the tag and creates the Gitea
|
||||||
release whose body is that changelog section. `arch-package`,
|
release whose body is that changelog section. `arch-package`,
|
||||||
`homebrew-formula`, `android-apk` and `desktop-assets` are all keyed on
|
`homebrew-formula`, `android-apk` and `desktop-assets` are all keyed on
|
||||||
`v*`, so **the tag push is what starts them** — nothing is released by
|
`v*`, so **the tag push is what starts them** — the version, the notes
|
||||||
hand any more.
|
and the packaging are still nobody's manual work; *when* is the only
|
||||||
|
decision left to a person.
|
||||||
|
|
||||||
|
**It used to fire on every push to `main`, which made the trigger "a PR
|
||||||
|
was merged".** That is a version per unit of *work* rather than per
|
||||||
|
*shipment*: eight releases in twenty-two hours (`v0.0.1` → `v0.3.1`) for
|
||||||
|
one session, each fanning out to four publishers on a runner with
|
||||||
|
capacity 1 — ~40 packaging jobs to ship three issues, with ordinary PR CI
|
||||||
|
queued behind them. Nothing else had to change to batch them, because
|
||||||
|
**semantic-release already reads every commit since the last tag**: five
|
||||||
|
`fix`es and two `feat`s become one minor release with all seven in the
|
||||||
|
notes. Release frequency was only ever how often the workflow fired.
|
||||||
|
|
||||||
|
This is the same rule `index-artifact.yml` states — *a job that mutates
|
||||||
|
state which cannot be rebuilt in ten minutes is triggered deliberately,
|
||||||
|
not by a push* — and the two are now the only workflows with no push
|
||||||
|
trigger. A schedule was considered and rejected: a cron batches without
|
||||||
|
anyone having to remember, but it puts the decision back on a timer,
|
||||||
|
which is the thing being removed. A `beta` integration branch was
|
||||||
|
considered and rejected too (#115): it relocates the trigger rather than
|
||||||
|
removing one, needs a second protected branch carrying the same required
|
||||||
|
checks, and *adds* a full `check` + `e2e` run per batch on the very
|
||||||
|
runner whose queue is the complaint.
|
||||||
|
|
||||||
|
**`dry_run` is why the manual trigger is usable.** The point of pulling
|
||||||
|
a lever by hand is being able to look first, so the dispatch takes a
|
||||||
|
flag that runs `semantic-release --dry-run`: the version and the notes,
|
||||||
|
no tag, no release, no publishers. Anything but the literal string
|
||||||
|
`true` releases for real — a typo in a dispatch box must not silently
|
||||||
|
turn a shipment into a green no-op.
|
||||||
|
|
||||||
|
**A prerelease tag is not a shipment, and all four publishers now say
|
||||||
|
so.** Their trigger is `v*`, which matches `v0.4.0-beta.1`; they guarded
|
||||||
|
`v0.0.0` and nothing else. Nothing produces a prerelease today — the
|
||||||
|
guard is there because the thing that would is `prerelease: true` in
|
||||||
|
`.releaserc.yml`, one line whose blast radius is a public Homebrew tap
|
||||||
|
and a credential-free APK registry that Obtainium polls. `android-apk`
|
||||||
|
is the worst of the four twice over, since its `versionCode` maths
|
||||||
|
splits on dots and would read `1` out of `0-beta` — a wrong number
|
||||||
|
rather than a failed build, and Android refuses anything not greater
|
||||||
|
than what is installed.
|
||||||
|
|
||||||
Four things about it are load-bearing:
|
Four things about it are load-bearing:
|
||||||
|
|
||||||
|
|||||||
@@ -192,15 +192,21 @@ skill-check: ## Fail if the agent docs name a missing make target, or AGENTS.md
|
|||||||
commit-check: ## Fail if a commit subject is not a Conventional Commit
|
commit-check: ## Fail if a commit subject is not a Conventional Commit
|
||||||
@./scripts/commit-check.sh $(if $(RANGE),--range $(RANGE))
|
@./scripts/commit-check.sh $(if $(RANGE),--range $(RANGE))
|
||||||
|
|
||||||
# What a merge to main would release, without releasing it. Reads the
|
# What running the release workflow now would ship, without shipping it.
|
||||||
# same .releaserc.yml CI does, so "why did that not cut a version" is
|
# Reads the same .releaserc.yml CI does, so "why did that not cut a
|
||||||
# answerable locally instead of by pushing and watching. Needs no
|
# version" is answerable locally instead of by pushing and watching.
|
||||||
# credentials: --dry-run neither tags nor publishes.
|
# Needs no credentials: --dry-run neither tags nor publishes.
|
||||||
|
#
|
||||||
|
# release.yml is dispatch-only, so this answers the question that
|
||||||
|
# actually gets asked now -- what has accumulated since the last tag --
|
||||||
|
# rather than what one merge would have done. The workflow's own
|
||||||
|
# `dry_run` input is the same answer from the runner, against whatever
|
||||||
|
# main points at rather than the working tree.
|
||||||
#
|
#
|
||||||
# The pins must stay identical to release.yml's, which is where the note
|
# The pins must stay identical to release.yml's, which is where the note
|
||||||
# on holding the conventionalcommits preset at 9 lives -- at 10 the
|
# on holding the conventionalcommits preset at 9 lives -- at 10 the
|
||||||
# release notes come out empty with everything green.
|
# release notes come out empty with everything green.
|
||||||
release-dry: ## Print the version a merge to main would release
|
release-dry: ## Print the version a release run would cut right now
|
||||||
@npx --yes \
|
@npx --yes \
|
||||||
-p semantic-release@25 \
|
-p semantic-release@25 \
|
||||||
-p @semantic-release/commit-analyzer@13 \
|
-p @semantic-release/commit-analyzer@13 \
|
||||||
|
|||||||
+16
-6
@@ -7,12 +7,22 @@ which is what lets Obtainium poll a plain URL with no token. It also
|
|||||||
attaches the same file to the Gitea release, which is what a person
|
attaches the same file to the Gitea release, which is what a person
|
||||||
looking at the release page downloads.
|
looking at the release page downloads.
|
||||||
|
|
||||||
**Tags are not pushed by hand any more.** `.gitea/workflows/release.yml`
|
**Tags are not pushed by hand any more, but releasing is a decision.**
|
||||||
reads the Conventional Commits on every merge to `main`, decides the
|
`.gitea/workflows/release.yml` reads the Conventional Commits since the
|
||||||
version, and pushes the tag this workflow is keyed on — so releasing the
|
last tag, decides the version, and pushes the tag this workflow is keyed
|
||||||
APK means merging a `fix:` or `feat:` commit, not running `git tag`. The
|
on — so releasing the APK means **running that workflow**, not running
|
||||||
`workflow_dispatch` path below remains, for rebuilding a tag that already
|
`git tag`. It has no push trigger: merging a `fix:` or `feat:` used to
|
||||||
exists.
|
be enough and produced a version per merged PR (issue #115). Run it with
|
||||||
|
`dry_run` first to see what the accumulated commits would ship. The
|
||||||
|
`workflow_dispatch` path below is a different thing and remains, for
|
||||||
|
rebuilding a tag that already exists.
|
||||||
|
|
||||||
|
**A prerelease tag is skipped here**, cleanly. This workflow triggers on
|
||||||
|
`v*`, which matches `v0.4.0-beta.1`, and it is the one where that would
|
||||||
|
hurt most: the APK goes to the credential-free generic registry that
|
||||||
|
Obtainium polls, and the `versionCode` maths below splits on dots — it
|
||||||
|
would read `1` out of `0-beta` and produce a wrong number rather than a
|
||||||
|
failed build.
|
||||||
|
|
||||||
## The 1.x installs cannot be upgraded to 0.0.x
|
## The 1.x installs cannot be upgraded to 0.0.x
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -39,7 +39,10 @@
|
|||||||
<audio-player></audio-player>
|
<audio-player></audio-player>
|
||||||
<button aria-label="Toggle queue" aria-controls="queue-panel" aria-expanded="false"
|
<button aria-label="Toggle queue" aria-controls="queue-panel" aria-expanded="false"
|
||||||
id="queue-button">
|
id="queue-button">
|
||||||
<wa-icon name="list"></wa-icon>
|
<!-- ICON_QUEUE in src/utils/icon-language.ts, written out
|
||||||
|
because this file has no module scope. It was `list`,
|
||||||
|
which is the Playlists destination's icon. -->
|
||||||
|
<wa-icon name="bars-staggered"></wa-icon>
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
<!-- The phone's primary navigation, hidden above 600px by
|
<!-- The phone's primary navigation, hidden above 600px by
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill="currentColor" d="M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM64 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L96 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"/></svg>
|
||||||
|
After Width: | Height: | Size: 609 B |
@@ -37,6 +37,10 @@ import type WaPopup from '@awesome.me/webawesome/dist/components/popup/popup.js'
|
|||||||
import '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';
|
import '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';
|
||||||
import '@components/playlist-picker/playlist-picker.js';
|
import '@components/playlist-picker/playlist-picker.js';
|
||||||
import { dict, list } from '@utils/binding';
|
import { dict, list } from '@utils/binding';
|
||||||
|
import {
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
/** Pixels to change card width per scroll tick. */
|
/** Pixels to change card width per scroll tick. */
|
||||||
const ZOOM_STEP = 16;
|
const ZOOM_STEP = 16;
|
||||||
@@ -1371,7 +1375,7 @@ export class ArtistsView
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_QUEUE}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
@@ -1407,7 +1411,7 @@ export class ArtistsView
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import type WaDrawer from '@awesome.me/webawesome/dist/components/drawer/drawer.
|
|||||||
import { designTokens } from '../../styles/tokens.css';
|
import { designTokens } from '../../styles/tokens.css';
|
||||||
import '../sidebar/app-sidebar.js';
|
import '../sidebar/app-sidebar.js';
|
||||||
import { nameDialog } from '@utils/name-dialog';
|
import { nameDialog } from '@utils/name-dialog';
|
||||||
|
import { ICON_PLAYLIST } from '@utils/icon-language';
|
||||||
|
|
||||||
type View = 'home' | 'albums' | 'tracks' | 'playlists';
|
type View = 'home' | 'albums' | 'tracks' | 'playlists';
|
||||||
|
|
||||||
@@ -138,7 +139,7 @@ export class BottomNav extends LitElement {
|
|||||||
{ id: 'home', label: 'Home', icon: 'house' },
|
{ id: 'home', label: 'Home', icon: 'house' },
|
||||||
{ id: 'albums', label: 'Albums', icon: 'compact-disc' },
|
{ id: 'albums', label: 'Albums', icon: 'compact-disc' },
|
||||||
{ id: 'tracks', label: 'Tracks', icon: 'music' },
|
{ id: 'tracks', label: 'Tracks', icon: 'music' },
|
||||||
{ id: 'playlists', label: 'Playlists', icon: 'list' },
|
{ id: 'playlists', label: 'Playlists', icon: ICON_PLAYLIST },
|
||||||
];
|
];
|
||||||
|
|
||||||
override connectedCallback() {
|
override connectedCallback() {
|
||||||
|
|||||||
@@ -76,6 +76,10 @@ import type {
|
|||||||
SortDirection,
|
SortDirection,
|
||||||
} from './cover-grid-types.js';
|
} from './cover-grid-types.js';
|
||||||
import { list } from '@utils/binding';
|
import { list } from '@utils/binding';
|
||||||
|
import {
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
@customElement('cover-grid')
|
@customElement('cover-grid')
|
||||||
export class CoverGrid
|
export class CoverGrid
|
||||||
@@ -2123,7 +2127,7 @@ export class CoverGrid
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_QUEUE}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
@@ -2156,7 +2160,7 @@ export class CoverGrid
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -52,6 +52,12 @@ import { dictByName } from '@utils/binding';
|
|||||||
import type { TrackDetails } from '@components/track-details/track-details.js';
|
import type { TrackDetails } from '@components/track-details/track-details.js';
|
||||||
import { showTrackDetailsForPath } from '@utils/track-details-opener.js';
|
import { showTrackDetailsForPath } from '@utils/track-details-opener.js';
|
||||||
import '@components/playlist-picker/playlist-picker.js';
|
import '@components/playlist-picker/playlist-picker.js';
|
||||||
|
import {
|
||||||
|
ICON_CAN_REQUEST,
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
ICON_REQUESTED,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The region the album header's own failures are rendered in.
|
* The region the album header's own failures are rendered in.
|
||||||
@@ -2437,7 +2443,7 @@ export class ExploreAlbumDetails extends LitElement implements ContextMenuHost {
|
|||||||
data-testid="album-queue"
|
data-testid="album-queue"
|
||||||
@click=${() => this.queueOwned()}
|
@click=${() => this.queueOwned()}
|
||||||
>
|
>
|
||||||
<wa-icon slot="start" name="list"></wa-icon>
|
<wa-icon slot="start" name=${ICON_QUEUE}></wa-icon>
|
||||||
Add to queue
|
Add to queue
|
||||||
</wa-button>
|
</wa-button>
|
||||||
${partial
|
${partial
|
||||||
@@ -2740,7 +2746,7 @@ export class ExploreAlbumDetails extends LitElement implements ContextMenuHost {
|
|||||||
of the same Free glyph carry the toggle instead. -->
|
of the same Free glyph carry the toggle instead. -->
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="start"
|
slot="start"
|
||||||
name=${this.isRequested ? 'solid/bookmark' : 'regular/bookmark'}
|
name=${this.isRequested ? ICON_REQUESTED : ICON_CAN_REQUEST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
${this.isRequested ? 'Requested' : 'Request this'}
|
${this.isRequested ? 'Requested' : 'Request this'}
|
||||||
</wa-button>
|
</wa-button>
|
||||||
@@ -3338,7 +3344,7 @@ export class ExploreAlbumDetails extends LitElement implements ContextMenuHost {
|
|||||||
@click=${() => this.onContextMenuAction('add-to-queue')}
|
@click=${() => this.onContextMenuAction('add-to-queue')}
|
||||||
@mouseenter=${() => this.ctxMenu.closePlaylistSubmenu()}
|
@mouseenter=${() => this.ctxMenu.closePlaylistSubmenu()}
|
||||||
>
|
>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_QUEUE}></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
<wa-dropdown-item
|
<wa-dropdown-item
|
||||||
@@ -3357,7 +3363,7 @@ export class ExploreAlbumDetails extends LitElement implements ContextMenuHost {
|
|||||||
this.openPlaylistSubmenu();
|
this.openPlaylistSubmenu();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_PLAYLIST}></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span class="submenu-arrow">▶</span>
|
<span class="submenu-arrow">▶</span>
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
|
|||||||
@@ -59,6 +59,12 @@ import { dict, dictByName } from '@utils/binding';
|
|||||||
import type { TrackDetails } from '@components/track-details/track-details.js';
|
import type { TrackDetails } from '@components/track-details/track-details.js';
|
||||||
import { showTrackDetailsForPath } from '@utils/track-details-opener.js';
|
import { showTrackDetailsForPath } from '@utils/track-details-opener.js';
|
||||||
import '@components/playlist-picker/playlist-picker.js';
|
import '@components/playlist-picker/playlist-picker.js';
|
||||||
|
import {
|
||||||
|
ICON_CAN_REQUEST,
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
ICON_REQUESTED,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
/* ── Constants ── */
|
/* ── Constants ── */
|
||||||
|
|
||||||
@@ -2674,7 +2680,7 @@ export class ExploreArtistDetails extends LitElement implements ContextMenuHost
|
|||||||
@click=${() => this.onContextMenuAction('add-to-queue')}
|
@click=${() => this.onContextMenuAction('add-to-queue')}
|
||||||
@mouseenter=${() => this.ctxMenu.closePlaylistSubmenu()}
|
@mouseenter=${() => this.ctxMenu.closePlaylistSubmenu()}
|
||||||
>
|
>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_QUEUE}></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
<wa-dropdown-item
|
<wa-dropdown-item
|
||||||
@@ -2693,7 +2699,7 @@ export class ExploreArtistDetails extends LitElement implements ContextMenuHost
|
|||||||
void this.openPlaylistSubmenu(true);
|
void this.openPlaylistSubmenu(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_PLAYLIST}></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span class="submenu-arrow">▶</span>
|
<span class="submenu-arrow">▶</span>
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
@@ -2737,7 +2743,7 @@ export class ExploreArtistDetails extends LitElement implements ContextMenuHost
|
|||||||
Play
|
Play
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
<wa-dropdown-item @click=${() => void this.onReleaseAction('add-to-queue')}>
|
<wa-dropdown-item @click=${() => void this.onReleaseAction('add-to-queue')}>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_QUEUE}></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
<wa-dropdown-item @click=${() => void this.onReleaseAction('play-next')}>
|
<wa-dropdown-item @click=${() => void this.onReleaseAction('play-next')}>
|
||||||
@@ -2751,7 +2757,7 @@ export class ExploreArtistDetails extends LitElement implements ContextMenuHost
|
|||||||
<wa-dropdown-item @click=${() => void this.onReleaseRequestToggle()}>
|
<wa-dropdown-item @click=${() => void this.onReleaseRequestToggle()}>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name=${requested ? 'xmark' : 'bookmark'}
|
name=${requested ? ICON_REQUESTED : ICON_CAN_REQUEST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
${requested ? 'Cancel Request' : 'Request This'}
|
${requested ? 'Cancel Request' : 'Request This'}
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
@@ -2789,9 +2795,15 @@ export class ExploreArtistDetails extends LitElement implements ContextMenuHost
|
|||||||
appearance=${request ? 'filled' : 'outlined'}
|
appearance=${request ? 'filled' : 'outlined'}
|
||||||
@click=${() => void this.toggleFollow(request?.id)}
|
@click=${() => void this.toggleFollow(request?.id)}
|
||||||
>
|
>
|
||||||
|
<!-- This was bookmark-check, which is not in
|
||||||
|
names.txt and so has rendered the missing-icon
|
||||||
|
fallback — a circled question mark — on every
|
||||||
|
followed artist since it was written. A
|
||||||
|
backtick around that name would end this
|
||||||
|
template literal, which is why there is none. -->
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="start"
|
slot="start"
|
||||||
name=${request ? 'bookmark-check' : 'bookmark'}
|
name=${request ? ICON_REQUESTED : ICON_CAN_REQUEST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
${request ? 'Following' : 'Follow for new releases'}
|
${request ? 'Following' : 'Follow for new releases'}
|
||||||
</wa-button>
|
</wa-button>
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import '@awesome.me/webawesome/dist/components/popup/popup.js';
|
|||||||
import type WaPopup from '@awesome.me/webawesome/dist/components/popup/popup.js';
|
import type WaPopup from '@awesome.me/webawesome/dist/components/popup/popup.js';
|
||||||
import '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';
|
import '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';
|
||||||
import { dict, dictByName } from '@utils/binding';
|
import { dict, dictByName } from '@utils/binding';
|
||||||
|
import { ICON_QUEUE } from '@utils/icon-language';
|
||||||
|
|
||||||
/** The region explore's own action failures (play/queue) are rendered in. */
|
/** The region explore's own action failures (play/queue) are rendered in. */
|
||||||
export const ExploreRegion = 'explore';
|
export const ExploreRegion = 'explore';
|
||||||
@@ -1342,7 +1343,7 @@ export class ExploreView extends ViewLifecycleMixin(LitElement) implements Conte
|
|||||||
Play
|
Play
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
<wa-dropdown-item @click=${() => this.onContextMenuAction('add-to-queue')}>
|
<wa-dropdown-item @click=${() => this.onContextMenuAction('add-to-queue')}>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_QUEUE}></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
<wa-dropdown-item @click=${() => this.onContextMenuAction('play-next')}>
|
<wa-dropdown-item @click=${() => this.onContextMenuAction('play-next')}>
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ import type WaPopup from '@awesome.me/webawesome/dist/components/popup/popup.js'
|
|||||||
import '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';
|
import '@awesome.me/webawesome/dist/components/dropdown-item/dropdown-item.js';
|
||||||
import '@components/playlist-picker/playlist-picker.js';
|
import '@components/playlist-picker/playlist-picker.js';
|
||||||
import { dictByName } from '@utils/binding';
|
import { dictByName } from '@utils/binding';
|
||||||
|
import {
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
/** Pixels to change card width per scroll tick. */
|
/** Pixels to change card width per scroll tick. */
|
||||||
const ZOOM_STEP = 16;
|
const ZOOM_STEP = 16;
|
||||||
@@ -1211,7 +1215,7 @@ export class GenresView
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_QUEUE}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
@@ -1257,7 +1261,7 @@ export class GenresView
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import '@awesome.me/webawesome/dist/components/icon/icon.js';
|
|||||||
import { toggleRequest } from '@utils/library-status';
|
import { toggleRequest } from '@utils/library-status';
|
||||||
import { notificationStore } from '@store/notification-store';
|
import { notificationStore } from '@store/notification-store';
|
||||||
import { describeError } from '@utils/describe-error';
|
import { describeError } from '@utils/describe-error';
|
||||||
|
import {
|
||||||
|
ICON_CAN_REQUEST,
|
||||||
|
ICON_IN_LIBRARY,
|
||||||
|
ICON_REQUESTED,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Library status for an entity (artist, album, or track).
|
* Library status for an entity (artist, album, or track).
|
||||||
@@ -248,18 +253,25 @@ export class LibraryStatusIndicator extends LitElement {
|
|||||||
* hourglass says "wait, this is under way", which overstates what a
|
* hourglass says "wait, this is under way", which overstates what a
|
||||||
* request is: nothing may be downloading, nothing may ever be found,
|
* request is: nothing may be downloading, nothing may ever be found,
|
||||||
* and the user can leave one sitting on the list indefinitely. A
|
* and the user can leave one sitting on the list indefinitely. A
|
||||||
* bookmark says the honest thing — it is on your list — and reads as
|
* bookmark says the honest thing — it is on your list.
|
||||||
* the opposite of the plus that put it there, which is what a
|
*
|
||||||
* toggle's two states have to do.
|
* The *other* state is the outline of that same bookmark, not a
|
||||||
|
* plus. Two states of one toggle have to read as each other's
|
||||||
|
* opposite, and a plus and a bookmark do not — this badge showed a
|
||||||
|
* plus on the same page as a "Request this" button already using
|
||||||
|
* the outline/solid pair, forty pixels away. That is the fault
|
||||||
|
* `utils/library-status.ts` was written for, one layer down: it
|
||||||
|
* made the two agree on what wanting *means* and left them
|
||||||
|
* disagreeing on what it looks like.
|
||||||
*/
|
*/
|
||||||
private iconName(): string {
|
private iconName(): string {
|
||||||
switch (this.status) {
|
switch (this.status) {
|
||||||
case 'in-library':
|
case 'in-library':
|
||||||
return 'check';
|
return ICON_IN_LIBRARY;
|
||||||
case 'queued':
|
case 'queued':
|
||||||
return 'bookmark';
|
return ICON_REQUESTED;
|
||||||
default:
|
default:
|
||||||
return 'plus';
|
return ICON_CAN_REQUEST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { creditStore } from '@store/credit-store';
|
|||||||
import { FavoritesController } from '@store/controllers/favorites-controller';
|
import { FavoritesController } from '@store/controllers/favorites-controller';
|
||||||
import { designTokens } from '../../styles/tokens.css';
|
import { designTokens } from '../../styles/tokens.css';
|
||||||
import { srOnly } from '../../styles/sr-only.css';
|
import { srOnly } from '../../styles/sr-only.css';
|
||||||
|
import { ICON_QUEUE } from '@utils/icon-language';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* What is playing, at the size a phone has room for (plan 016 B2,
|
* What is playing, at the size a phone has room for (plan 016 B2,
|
||||||
@@ -339,7 +340,7 @@ export class NowPlayingView extends LitElement {
|
|||||||
aria-label="Show the queue"
|
aria-label="Show the queue"
|
||||||
@click=${this.openQueue}
|
@click=${this.openQueue}
|
||||||
>
|
>
|
||||||
<wa-icon name="list"></wa-icon>
|
<wa-icon name=${ICON_QUEUE}></wa-icon>
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -70,6 +70,10 @@ import {
|
|||||||
} from '@utils/explore-link';
|
} from '@utils/explore-link';
|
||||||
import { designTokens } from '../../styles/tokens.css';
|
import { designTokens } from '../../styles/tokens.css';
|
||||||
import { list } from '@utils/binding';
|
import { list } from '@utils/binding';
|
||||||
|
import {
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
/** One playlist row: the track and its position in the *playlist*,
|
/** One playlist row: the track and its position in the *playlist*,
|
||||||
* which is not its position in the filtered view. */
|
* which is not its position in the filtered view. */
|
||||||
@@ -1358,7 +1362,7 @@ export class PlaylistDetails
|
|||||||
</button>
|
</button>
|
||||||
<div class="playlist-avatar">
|
<div class="playlist-avatar">
|
||||||
<wa-icon
|
<wa-icon
|
||||||
name="list"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="playlist-info">
|
<div class="playlist-info">
|
||||||
@@ -1665,7 +1669,7 @@ export class PlaylistDetails
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_QUEUE}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
@@ -1720,7 +1724,7 @@ export class PlaylistDetails
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { notificationStore } from '@store/notification-store';
|
|||||||
import { describeError } from '@utils/describe-error';
|
import { describeError } from '@utils/describe-error';
|
||||||
import type { DuplicateTracksDialog } from '@components/duplicate-tracks-dialog/duplicate-tracks-dialog.js';
|
import type { DuplicateTracksDialog } from '@components/duplicate-tracks-dialog/duplicate-tracks-dialog.js';
|
||||||
import { list } from '@utils/binding';
|
import { list } from '@utils/binding';
|
||||||
|
import { ICON_NEW } from '@utils/icon-language';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A reusable playlist picker that displays existing playlists
|
* A reusable playlist picker that displays existing playlists
|
||||||
@@ -307,7 +308,7 @@ export class PlaylistPicker extends LitElement {
|
|||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
<wa-dropdown-item @click=${this.handleShowCreate}>
|
<wa-dropdown-item @click=${this.handleShowCreate}>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_NEW}></wa-icon>
|
||||||
New Playlist
|
New Playlist
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ import { ViewLifecycleMixin } from '@utils/view-lifecycle';
|
|||||||
import { FavoritesController } from '@store/controllers/favorites-controller';
|
import { FavoritesController } from '@store/controllers/favorites-controller';
|
||||||
import '@components/duplicate-tracks-dialog/duplicate-tracks-dialog.js';
|
import '@components/duplicate-tracks-dialog/duplicate-tracks-dialog.js';
|
||||||
import type { DuplicateTracksDialog } from '@components/duplicate-tracks-dialog/duplicate-tracks-dialog.js';
|
import type { DuplicateTracksDialog } from '@components/duplicate-tracks-dialog/duplicate-tracks-dialog.js';
|
||||||
|
import {
|
||||||
|
ICON_NEW,
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
const SCROLL_DEBOUNCE_MS = 100;
|
const SCROLL_DEBOUNCE_MS = 100;
|
||||||
|
|
||||||
@@ -1496,7 +1500,7 @@ export class PlaylistView extends ViewLifecycleMixin(LitElement) {
|
|||||||
@dragleave=${this.onNewButtonDragLeave}
|
@dragleave=${this.onNewButtonDragLeave}
|
||||||
@drop=${this.onNewButtonDrop}
|
@drop=${this.onNewButtonDrop}
|
||||||
>
|
>
|
||||||
<wa-icon name="plus"></wa-icon>
|
<wa-icon name=${ICON_NEW}></wa-icon>
|
||||||
New Playlist
|
New Playlist
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@@ -1641,10 +1645,10 @@ export class PlaylistView extends ViewLifecycleMixin(LitElement) {
|
|||||||
>
|
>
|
||||||
<div class="drop-zone-icon">
|
<div class="drop-zone-icon">
|
||||||
<wa-icon
|
<wa-icon
|
||||||
name="plus"
|
name=${ICON_NEW}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
</div>
|
</div>
|
||||||
<wa-icon name="list"></wa-icon>
|
<wa-icon name=${ICON_PLAYLIST}></wa-icon>
|
||||||
<p>No playlists yet</p>
|
<p>No playlists yet</p>
|
||||||
<p style="font-size: 12px;">
|
<p style="font-size: 12px;">
|
||||||
Create a playlist or drop
|
Create a playlist or drop
|
||||||
@@ -1666,7 +1670,7 @@ export class PlaylistView extends ViewLifecycleMixin(LitElement) {
|
|||||||
>
|
>
|
||||||
<div class="drop-zone-icon">
|
<div class="drop-zone-icon">
|
||||||
<wa-icon
|
<wa-icon
|
||||||
name="plus"
|
name=${ICON_NEW}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
@@ -1701,7 +1705,7 @@ export class PlaylistView extends ViewLifecycleMixin(LitElement) {
|
|||||||
>
|
>
|
||||||
<div class="drop-zone-icon">
|
<div class="drop-zone-icon">
|
||||||
<wa-icon
|
<wa-icon
|
||||||
name="plus"
|
name=${ICON_NEW}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ import {
|
|||||||
trackLink,
|
trackLink,
|
||||||
exploreLinkStyles,
|
exploreLinkStyles,
|
||||||
} from '@utils/explore-link';
|
} from '@utils/explore-link';
|
||||||
|
import {
|
||||||
|
ICON_NEW,
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
} from '@utils/icon-language';
|
||||||
/** Above this many tracks, clearing the queue asks first. */
|
/** Above this many tracks, clearing the queue asks first. */
|
||||||
const CLEAR_CONFIRM_THRESHOLD = 20;
|
const CLEAR_CONFIRM_THRESHOLD = 20;
|
||||||
|
|
||||||
@@ -1755,7 +1760,7 @@ export class QueuePanel
|
|||||||
title="Add queue to playlist"
|
title="Add queue to playlist"
|
||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
name="plus"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -1794,11 +1799,11 @@ export class QueuePanel
|
|||||||
? html`<div class="empty-state">
|
? html`<div class="empty-state">
|
||||||
<div class="drop-zone-icon">
|
<div class="drop-zone-icon">
|
||||||
<wa-icon
|
<wa-icon
|
||||||
name="plus"
|
name=${ICON_NEW}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
</div>
|
</div>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
name="list"
|
name=${ICON_QUEUE}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
<p>Queue is empty</p>
|
<p>Queue is empty</p>
|
||||||
<p style="font-size: 12px;">
|
<p style="font-size: 12px;">
|
||||||
@@ -1875,7 +1880,7 @@ export class QueuePanel
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import '@awesome.me/webawesome/dist/components/icon/icon.js';
|
|||||||
import { designTokens } from '../../styles/tokens.css';
|
import { designTokens } from '../../styles/tokens.css';
|
||||||
|
|
||||||
import type { DragActiveDetail } from '@utils/drag-controller';
|
import type { DragActiveDetail } from '@utils/drag-controller';
|
||||||
|
import {
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_REQUESTED,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
type View = 'home' | 'playlists' | 'artists' | 'genres' | 'albums' | 'tracks' | 'explore' | 'downloads' | 'autotag' | 'jobs' | 'settings';
|
type View = 'home' | 'playlists' | 'artists' | 'genres' | 'albums' | 'tracks' | 'explore' | 'downloads' | 'autotag' | 'jobs' | 'settings';
|
||||||
|
|
||||||
@@ -197,13 +201,13 @@ export class AppSidebar extends LitElement {
|
|||||||
|
|
||||||
private navItems: NavItem[] = [
|
private navItems: NavItem[] = [
|
||||||
{ id: 'home', label: 'Home', icon: 'house' },
|
{ id: 'home', label: 'Home', icon: 'house' },
|
||||||
{ id: 'playlists', label: 'Playlists', icon: 'list' },
|
{ id: 'playlists', label: 'Playlists', icon: ICON_PLAYLIST },
|
||||||
{ id: 'artists', label: 'Artists', icon: 'user-group' },
|
{ id: 'artists', label: 'Artists', icon: 'user-group' },
|
||||||
{ id: 'genres', label: 'Genres', icon: 'masks-theater' },
|
{ id: 'genres', label: 'Genres', icon: 'masks-theater' },
|
||||||
{ id: 'albums', label: 'Albums', icon: 'compact-disc' },
|
{ id: 'albums', label: 'Albums', icon: 'compact-disc' },
|
||||||
{ id: 'tracks', label: 'Tracks', icon: 'music' },
|
{ id: 'tracks', label: 'Tracks', icon: 'music' },
|
||||||
{ id: 'explore', label: 'Explore', icon: 'globe' },
|
{ id: 'explore', label: 'Explore', icon: 'globe' },
|
||||||
{ id: 'downloads', label: 'Downloads', icon: 'bookmark' },
|
{ id: 'downloads', label: 'Downloads', icon: ICON_REQUESTED },
|
||||||
{ id: 'autotag', label: 'Autotag', icon: 'tag' },
|
{ id: 'autotag', label: 'Autotag', icon: 'tag' },
|
||||||
{ id: 'jobs', label: 'Jobs', icon: 'list-check' },
|
{ id: 'jobs', label: 'Jobs', icon: 'list-check' },
|
||||||
{ id: 'settings', label: 'Settings', icon: 'gear' },
|
{ id: 'settings', label: 'Settings', icon: 'gear' },
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ import {
|
|||||||
import '@components/smart-playlist-editor/smart-playlist-editor.js';
|
import '@components/smart-playlist-editor/smart-playlist-editor.js';
|
||||||
import { designTokens } from '../../styles/tokens.css';
|
import { designTokens } from '../../styles/tokens.css';
|
||||||
import { list } from '@utils/binding';
|
import { list } from '@utils/binding';
|
||||||
|
import {
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1481,7 +1485,7 @@ export class SmartPlaylistDetails
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_QUEUE}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
@@ -1521,7 +1525,7 @@ export class SmartPlaylistDetails
|
|||||||
>
|
>
|
||||||
<wa-icon
|
<wa-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
name="plus"
|
name=${ICON_PLAYLIST}
|
||||||
></wa-icon>
|
></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ import { tracksByFilePath, tracksForPaths } from '@utils/track-index.js';
|
|||||||
import '@components/playlist-picker/playlist-picker.js';
|
import '@components/playlist-picker/playlist-picker.js';
|
||||||
import type { TrackDetails } from '@components/track-details/track-details.js';
|
import type { TrackDetails } from '@components/track-details/track-details.js';
|
||||||
import type { CoverArtUrls } from '@components/track-details/track-details.js';
|
import type { CoverArtUrls } from '@components/track-details/track-details.js';
|
||||||
|
import {
|
||||||
|
ICON_PLAYLIST,
|
||||||
|
ICON_QUEUE,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
const COLUMN_STORAGE_KEY = 'track-list-column-widths';
|
const COLUMN_STORAGE_KEY = 'track-list-column-widths';
|
||||||
const SORT_FIELD_KEY = 'track-list-sort-field';
|
const SORT_FIELD_KEY = 'track-list-sort-field';
|
||||||
@@ -2342,7 +2346,7 @@ export class TrackList
|
|||||||
@click=${() => this.onContextMenuAction('add-to-queue')}
|
@click=${() => this.onContextMenuAction('add-to-queue')}
|
||||||
@mouseenter=${() => this.ctxMenu.closePlaylistSubmenu()}
|
@mouseenter=${() => this.ctxMenu.closePlaylistSubmenu()}
|
||||||
>
|
>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_QUEUE}></wa-icon>
|
||||||
Add to Queue
|
Add to Queue
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
<wa-dropdown-item
|
<wa-dropdown-item
|
||||||
@@ -2364,7 +2368,7 @@ export class TrackList
|
|||||||
void this.ctxMenu.showPlaylistSubmenu(this.selection.getSelectedKeysOrdered());
|
void this.ctxMenu.showPlaylistSubmenu(this.selection.getSelectedKeysOrdered());
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<wa-icon slot="icon" name="plus"></wa-icon>
|
<wa-icon slot="icon" name=${ICON_PLAYLIST}></wa-icon>
|
||||||
Add to Playlist
|
Add to Playlist
|
||||||
<span class="submenu-arrow">▶</span>
|
<span class="submenu-arrow">▶</span>
|
||||||
</wa-dropdown-item>
|
</wa-dropdown-item>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ solid/arrows-rotate
|
|||||||
solid/arrow-up-short-wide
|
solid/arrow-up-short-wide
|
||||||
solid/backward-step
|
solid/backward-step
|
||||||
solid/bars
|
solid/bars
|
||||||
|
solid/bars-staggered
|
||||||
regular/bookmark
|
regular/bookmark
|
||||||
solid/bookmark
|
solid/bookmark
|
||||||
solid/box-open
|
solid/box-open
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
/**
|
||||||
|
* What each icon in this app means, once.
|
||||||
|
*
|
||||||
|
* The set was a mix: `plus` meant "add to the queue", "add to a
|
||||||
|
* playlist", "make a new playlist" and "you do not own this" — the
|
||||||
|
* first two *adjacent in the same context menu* — while `list` meant
|
||||||
|
* the queue, the Playlists destination, and (in `queue-panel` alone)
|
||||||
|
* adding to the queue. Two icons carrying seven meanings between them
|
||||||
|
* is not a vocabulary, and a user cannot learn one that says four
|
||||||
|
* things.
|
||||||
|
*
|
||||||
|
* The rule these are chosen by: **an icon names the noun it acts on,
|
||||||
|
* not the verb.** "Add to queue" and "add to playlist" are the same
|
||||||
|
* verb on different nouns, so the noun is what has to differ — which is
|
||||||
|
* also why adding to a playlist wears the Playlists destination's own
|
||||||
|
* icon rather than a generic plus. `plus` survives for exactly the one
|
||||||
|
* thing it is unambiguous about, making something that did not exist.
|
||||||
|
*
|
||||||
|
* Import these rather than writing a name inline. A literal string is
|
||||||
|
* how the last set drifted, and nothing catches it: a wrong-but-real
|
||||||
|
* icon renders perfectly.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Start playing this now. */
|
||||||
|
export const ICON_PLAY = 'play';
|
||||||
|
|
||||||
|
/** Start playing this now, in a shuffled order. */
|
||||||
|
export const ICON_SHUFFLE = 'shuffle';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The queue, and putting something into it.
|
||||||
|
*
|
||||||
|
* One glyph for the noun and the action, so the button that opens the
|
||||||
|
* queue and the menu item that adds to it are visibly the same subject.
|
||||||
|
* The queue used to wear `list`, which is the Playlists destination.
|
||||||
|
*/
|
||||||
|
export const ICON_QUEUE = 'bars-staggered';
|
||||||
|
|
||||||
|
/** Put this next in the queue rather than at the end. */
|
||||||
|
export const ICON_PLAY_NEXT = 'forward-step';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A playlist, and adding something to one.
|
||||||
|
*
|
||||||
|
* The same icon as the Playlists destination in the sidebar, which is
|
||||||
|
* the point: the menu item says where the thing is going.
|
||||||
|
*/
|
||||||
|
export const ICON_PLAYLIST = 'list';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a new thing that did not exist — a playlist, a rule, a library.
|
||||||
|
*
|
||||||
|
* This is the only meaning `plus` keeps. It used to carry four.
|
||||||
|
*/
|
||||||
|
export const ICON_NEW = 'plus';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The request ("want") toggle, as an outline/solid pair.
|
||||||
|
*
|
||||||
|
* Two states of one control have to read as each other's opposite,
|
||||||
|
* which a plus and a bookmark do not. The pair was already in the app
|
||||||
|
* and already correct — `explore-album-details`'s "Want this" button
|
||||||
|
* has used it since it was written, and `favorites-controller` uses the
|
||||||
|
* same shape for `regular/heart` → `heart` — while the badge forty
|
||||||
|
* pixels away showed a plus for the same state.
|
||||||
|
*
|
||||||
|
* That is `utils/library-status.ts`'s fault one layer down: it made the
|
||||||
|
* two surfaces agree on *what wanting means* and left them disagreeing
|
||||||
|
* on what it looks like.
|
||||||
|
*/
|
||||||
|
export const ICON_CAN_REQUEST = 'regular/bookmark';
|
||||||
|
export const ICON_REQUESTED = 'solid/bookmark';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* You have this.
|
||||||
|
*
|
||||||
|
* Deliberately not drawn on the common case — see the tracklist, where
|
||||||
|
* absence is what gets marked. This is for the places that answer the
|
||||||
|
* question directly, like the badge on a catalog card.
|
||||||
|
*/
|
||||||
|
export const ICON_IN_LIBRARY = 'check';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Something is being fetched right now.
|
||||||
|
*
|
||||||
|
* Distinct from `ICON_REQUESTED`: a request may sit on the list
|
||||||
|
* forever without anything happening, which is exactly why the badge's
|
||||||
|
* "queued" state stopped being an hourglass.
|
||||||
|
*/
|
||||||
|
export const ICON_DOWNLOADING = 'download';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Take this away.
|
||||||
|
*
|
||||||
|
* One icon for removing from a playlist, from the queue and from the
|
||||||
|
* library, because the difference that matters is stated in the words
|
||||||
|
* beside it and in the confirmation — "Remove from Library" says in its
|
||||||
|
* impact line that the files are not deleted.
|
||||||
|
*/
|
||||||
|
export const ICON_REMOVE = 'trash';
|
||||||
@@ -19,6 +19,11 @@ import {
|
|||||||
update,
|
update,
|
||||||
visual,
|
visual,
|
||||||
} from '@test/support/render';
|
} from '@test/support/render';
|
||||||
|
import {
|
||||||
|
ICON_CAN_REQUEST,
|
||||||
|
ICON_IN_LIBRARY,
|
||||||
|
ICON_REQUESTED,
|
||||||
|
} from '@utils/icon-language';
|
||||||
|
|
||||||
describe('<app-sidebar>', () => {
|
describe('<app-sidebar>', () => {
|
||||||
it('renders a testid per destination, which is how e2e navigates', async () => {
|
it('renders a testid per destination, which is how e2e navigates', async () => {
|
||||||
@@ -154,9 +159,20 @@ describe('<library-status-indicator>', () => {
|
|||||||
it('defaults to "not in library"', async () => {
|
it('defaults to "not in library"', async () => {
|
||||||
const el = await fixture('library-status-indicator');
|
const el = await fixture('library-status-indicator');
|
||||||
|
|
||||||
expect(shadow(el, 'wa-icon')?.getAttribute('name')).toBe('plus');
|
expect(shadow(el, 'wa-icon')?.getAttribute('name')).toBe(ICON_CAN_REQUEST);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Named from the vocabulary rather than written out, or this test
|
||||||
|
* pins the glyphs *against* the table it is supposed to follow —
|
||||||
|
* which is what it did: it asserted `plus` for the un-owned state,
|
||||||
|
* the same glyph two adjacent menu items were using for two other
|
||||||
|
* meanings, and passing was the reason nobody looked.
|
||||||
|
*
|
||||||
|
* What is still worth asserting is that the three differ, which is
|
||||||
|
* the property the states need and the one the table cannot state
|
||||||
|
* about itself here.
|
||||||
|
*/
|
||||||
it('uses a distinct glyph per state', async () => {
|
it('uses a distinct glyph per state', async () => {
|
||||||
const glyphs: (string | null | undefined)[] = [];
|
const glyphs: (string | null | undefined)[] = [];
|
||||||
|
|
||||||
@@ -166,7 +182,8 @@ describe('<library-status-indicator>', () => {
|
|||||||
glyphs.push(shadow(el, 'wa-icon')?.getAttribute('name'));
|
glyphs.push(shadow(el, 'wa-icon')?.getAttribute('name'));
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(glyphs).toEqual(['check', 'bookmark', 'plus']);
|
expect(glyphs).toEqual([ICON_IN_LIBRARY, ICON_REQUESTED, ICON_CAN_REQUEST]);
|
||||||
|
expect(new Set(glyphs).size).toBe(3);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('phrases its label around the entity it describes', async () => {
|
it('phrases its label around the entity it describes', async () => {
|
||||||
|
|||||||
@@ -0,0 +1,140 @@
|
|||||||
|
/**
|
||||||
|
* The icon vocabulary is one table, and nothing writes around it.
|
||||||
|
*
|
||||||
|
* A wrong-but-real icon name renders perfectly: no error, no fallback,
|
||||||
|
* no failing assertion anywhere. That is how `plus` came to mean "add
|
||||||
|
* to the queue", "add to a playlist", "make a new playlist" and "you do
|
||||||
|
* not own this" — the first two adjacent in the same context menu —
|
||||||
|
* while `list` meant the queue, the Playlists destination *and* adding
|
||||||
|
* to the queue.
|
||||||
|
*
|
||||||
|
* `src/icons/index.ts` catches a name that is not *bundled*. Nothing
|
||||||
|
* catches a name that is bundled and means something else, so this
|
||||||
|
* sweeps the source for the governed ones. It is the same shape as
|
||||||
|
* `TestNoDirectRuntimeEmits` and `TestNoWritesOnTheReadPool` in the
|
||||||
|
* backend, and exists for the same reason: the rule is about every call
|
||||||
|
* site, so checking one is checking nothing.
|
||||||
|
*/
|
||||||
|
import { describe, expect, it } from 'vitest';
|
||||||
|
|
||||||
|
import { bundledIconNames } from '../../src/icons';
|
||||||
|
import * as icons from '@utils/icon-language';
|
||||||
|
|
||||||
|
/** Every component source, as text. */
|
||||||
|
const SOURCES = import.meta.glob<string>('../../src/**/*.ts', {
|
||||||
|
eager: true,
|
||||||
|
query: '?raw',
|
||||||
|
import: 'default',
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The names that carry a meaning the table owns.
|
||||||
|
*
|
||||||
|
* Deliberately not every bundled name. `check` is `ICON_IN_LIBRARY`
|
||||||
|
* here and also the "Copied" confirmation in `job-log-view`, which is
|
||||||
|
* a different, perfectly good meaning — governing it would force a
|
||||||
|
* false rename. What belongs on this list is a name that was actually
|
||||||
|
* overloaded.
|
||||||
|
*/
|
||||||
|
const GOVERNED = [
|
||||||
|
'plus',
|
||||||
|
'list',
|
||||||
|
'bookmark',
|
||||||
|
'solid/bookmark',
|
||||||
|
'regular/bookmark',
|
||||||
|
'bars-staggered',
|
||||||
|
];
|
||||||
|
|
||||||
|
/** The one file allowed to say them, plus its own test. */
|
||||||
|
const DEFINITION = /icon-language\.(ts|test\.ts)$/;
|
||||||
|
|
||||||
|
describe('the icon vocabulary', () => {
|
||||||
|
/**
|
||||||
|
* A sweep over nothing passes. This is the assertion that makes the
|
||||||
|
* rest of the file mean something, and it is the first thing that
|
||||||
|
* breaks if the glob pattern stops matching after a move.
|
||||||
|
*/
|
||||||
|
it('actually reads the source', () => {
|
||||||
|
const paths = Object.keys(SOURCES);
|
||||||
|
|
||||||
|
expect(paths.length).toBeGreaterThan(100);
|
||||||
|
expect(paths.some((p) => p.endsWith('/track-list.ts'))).toBe(true);
|
||||||
|
expect(SOURCES[paths[0]!]).toContain('import');
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(GOVERNED)('is not written around for %s', (name) => {
|
||||||
|
const offenders: string[] = [];
|
||||||
|
|
||||||
|
for (const [path, source] of Object.entries(SOURCES)) {
|
||||||
|
if (DEFINITION.test(path)) continue;
|
||||||
|
|
||||||
|
// Both spellings: an icon in a template, and an icon name in a
|
||||||
|
// data table (which is how the sidebar and bottom-nav carry
|
||||||
|
// theirs).
|
||||||
|
const literal = new RegExp(
|
||||||
|
`(name="${name}"|icon: '${name}'|name=\\$\\{[^}]*'${name}')`,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (literal.test(source)) offenders.push(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(offenders).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A meaning with no icon behind it is the state the badge's `queued`
|
||||||
|
* spent a year in — declared, styled, and produced by nothing.
|
||||||
|
*/
|
||||||
|
it('gives every meaning a name', () => {
|
||||||
|
const values = Object.entries(icons).filter(([k]) => k.startsWith('ICON_'));
|
||||||
|
|
||||||
|
expect(values.length).toBeGreaterThan(0);
|
||||||
|
|
||||||
|
for (const [key, value] of values) {
|
||||||
|
expect(`${key}=${value}`).toMatch(/^ICON_[A-Z_]+=[a-z]+[a-z/-]*$/);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Every name in the table is a name the app actually ships.
|
||||||
|
*
|
||||||
|
* This is the loop the vocabulary closes. A name that is not bundled
|
||||||
|
* renders a circled question mark and reports itself to
|
||||||
|
* `__yjIconMisses` — at *runtime*, from a state something has to
|
||||||
|
* reach first. `bookmark-check` is Font Awesome **Pro**, and it was
|
||||||
|
* on `explore-artist-details`'s Follow button, drawn for every
|
||||||
|
* followed artist, invisible to `offline-icons.spec.ts` because no
|
||||||
|
* spec had ever followed one. Reaching the state is no longer how
|
||||||
|
* this is found.
|
||||||
|
*/
|
||||||
|
it('names only icons that are bundled', () => {
|
||||||
|
const bundled = new Set(bundledIconNames());
|
||||||
|
const missing = Object.entries(icons)
|
||||||
|
.filter(([k]) => k.startsWith('ICON_'))
|
||||||
|
.filter(([, v]) => !bundled.has(v as string))
|
||||||
|
.map(([k, v]) => `${k} (${v})`);
|
||||||
|
|
||||||
|
expect(missing).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The two states of the request toggle have to be the same glyph in
|
||||||
|
* two weights, or they do not read as each other's opposite — which
|
||||||
|
* is what a plus against a bookmark was.
|
||||||
|
*/
|
||||||
|
it('makes the request toggle an outline/solid pair', () => {
|
||||||
|
expect(icons.ICON_CAN_REQUEST).toBe(`regular/${icons.ICON_REQUESTED.replace('solid/', '')}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The queue and the Playlists destination wore the same icon, and
|
||||||
|
* "add to queue" and "add to playlist" sat next to each other wearing
|
||||||
|
* a third same one. Whatever the table says, these three have to
|
||||||
|
* differ from each other.
|
||||||
|
*/
|
||||||
|
it('keeps the queue, playlists and creating something apart', () => {
|
||||||
|
const three = [icons.ICON_QUEUE, icons.ICON_PLAYLIST, icons.ICON_NEW];
|
||||||
|
|
||||||
|
expect(new Set(three).size).toBe(3);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,10 +1,15 @@
|
|||||||
# YellowJacket Arch package
|
# YellowJacket Arch package
|
||||||
|
|
||||||
This directory holds the `PKGBUILD` and desktop entry used to build the
|
This directory holds the `PKGBUILD` and desktop entry used to build the
|
||||||
Arch Linux package. CI builds it on every push to `main` (see
|
Arch Linux package. CI builds it on every **release tag** (see
|
||||||
`.gitea/workflows/arch-package.yml`) and publishes it to the Gitea Arch
|
`.gitea/workflows/arch-package.yml`) and publishes it to the Gitea Arch
|
||||||
package registry, from which pacman can install it directly.
|
package registry, from which pacman can install it directly.
|
||||||
|
|
||||||
|
Tags come from `.gitea/workflows/release.yml`, which is run by hand — it
|
||||||
|
used to fire on every push to `main`, which meant a new package per
|
||||||
|
merged PR (issue #115). A prerelease tag (`v0.4.0-beta.1`) is skipped:
|
||||||
|
the workflow's trigger is `v*` and matches one.
|
||||||
|
|
||||||
## Installing from the registry
|
## Installing from the registry
|
||||||
|
|
||||||
The registry is public — no login required.
|
The registry is public — no login required.
|
||||||
@@ -58,7 +63,7 @@ this is not recommended.
|
|||||||
- Only the runtime package is published; the `-debug` package makepkg
|
- Only the runtime package is published; the `-debug` package makepkg
|
||||||
produces (detached symbols) is skipped by the workflow.
|
produces (detached symbols) is skipped by the workflow.
|
||||||
- Package versions come from `pkgver()` in the PKGBUILD, derived from git
|
- Package versions come from `pkgver()` in the PKGBUILD, derived from git
|
||||||
(e.g. `1.3.0.r173.g4ae5ffc-1`), so every push to `main` yields a new
|
(e.g. `1.3.0.r173.g4ae5ffc-1`), so every release tag yields a new
|
||||||
version.
|
version.
|
||||||
- Repo priority: if another configured repo ever provides a package named
|
- Repo priority: if another configured repo ever provides a package named
|
||||||
`yellowjacket`, the repo listed **first** in `pacman.conf` wins. Force a
|
`yellowjacket`, the repo listed **first** in `pacman.conf` wins. Force a
|
||||||
|
|||||||
Reference in New Issue
Block a user