Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-use flarum/subscription colors so follow menu works with dark… #74

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
with:
enable_backend_testing: false
enable_phpstan: true
php_versions: '["8.0", "8.1", "8.2"]'
php_versions: '["8.0", "8.1", "8.2", "8.3"]'
backend_directory: .
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
}
],
"require": {
"php": "^8.0",
"flarum/core": "^1.8.3",
"flarum/tags": "^1.8.0",
"fof/extend": "^1.2.0"
Expand Down
18 changes: 14 additions & 4 deletions resources/less/forum.less
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,24 @@
}

&.selected {
background-color: @alert-bg;
color: @alert-color;
background-color: var(--following-bg);
color: var(--following-color);

.SubscriptionOption-icon {
color: var(--following-color);
}

.SubscriptionOption-title {
color: var(--following-color);
}

.SubscriptionOption-description {
color: var(--following-color);
}
}

.SubscriptionOption-icon {
flex-shrink: 0;
color: @muted-color;
font-size: 1.2em; // Increase the size of the icon
}

Expand All @@ -105,7 +116,6 @@
.SubscriptionOption-description {
flex-grow: 1; // This will make the description take up the remaining width
padding-left: 10px; // Some spacing between the title and the description
color: @muted-color;
}

.SubscriptionOption-selectedIcon {
Expand Down
1 change: 0 additions & 1 deletion src/AddTagSubscriptionAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function getStateFor(Tag $tag, User $actor): TagState
// If $tag->state is loaded *and* null, this might be because the actor doesn't have tag-specific state
// OR because the wrong actor has been used for loading it. `$tag->stateFor()` will return the correct state.
// If it doesn't exist, it returns a dummy state with the correct actor & tag IDs.
// @phpstan-ignore-next-line ($tag->state may indeed be null)
if (!$tag->relationLoaded('state') || is_null($tag->state) || $tag->state->user_id !== $actor->id) {
$tag->setRelation('state', $tag->stateFor($actor));
}
Expand Down
Loading