refactor(tailwind): replace deprecated tailwind utilities#2542
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThis PR converts explicit Tailwind background opacity utilities (e.g., Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
This is my first PR. I have tried to follow all guidelines. Please let me know if I missed something. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/components/UserProfile/UserSettings/UserLinkedAccountsSettings/index.tsx (1)
102-111:⚠️ Potential issue | 🔴 CriticalCritical: Duplicate
setErrorcall masks specific error messages.Line 110 unconditionally overwrites all error messages with the generic "errorUnknown" message, preventing users from seeing the helpful error messages for unauthorized (401) or duplicate account (422) scenarios. This defeats the purpose of the specific error handling above it.
🐛 Proposed fix: Remove the duplicate setError call
} catch (e) { if (e?.response?.status === 401) { setError(intl.formatMessage(messages.plexErrorUnauthorized)); } else if (e?.response?.status === 422) { setError(intl.formatMessage(messages.plexErrorExists)); } else { setError(intl.formatMessage(messages.errorUnknown)); } - setError(intl.formatMessage(messages.errorUnknown)); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/UserProfile/UserSettings/UserLinkedAccountsSettings/index.tsx` around lines 102 - 111, In the catch block inside UserLinkedAccountsSettings (index.tsx) you currently call setError for specific cases (401 and 422) but then unconditionally call setError(intl.formatMessage(messages.errorUnknown)), which overwrites those specific messages; remove the final unconditional setError call so that only the specific error handlers (e?.response?.status === 401, 422) or the final else branch set the error message, leaving the specific messages intact.src/components/Common/Dropdown/index.tsx (1)
94-99:⚠️ Potential issue | 🟡 MinorDropdown button is missing its base background color.
The primary (non-ghost) button state lacks a background fill and relies only on the border and active state. This is inconsistent with related components (
DropdownItem,Button,ButtonWithDropdown) which all include a base background color. Consider applyingbg-indigo-600/80with corresponding hover state (hover:bg-indigo-600) to match the pattern used inButtonWithDropdown.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/Common/Dropdown/index.tsx` around lines 94 - 99, The primary Dropdown button (in the Dropdown component where className is composed based on buttonType) is missing its base background; update the non-ghost branch that currently applies border/active classes to also include a base background and hover fill (e.g., add bg-indigo-600/80 and hover:bg-indigo-600 alongside the existing 'focus:ring-blue border-indigo-500/80 hover:border-indigo-500 active:border-indigo-700 active:bg-indigo-700') so the Dropdown button matches Button and ButtonWithDropdown styling while leaving the 'ghost' branch unchanged.
🧹 Nitpick comments (1)
src/components/RequestModal/SearchByNameModal/index.tsx (1)
83-83: Missed deprecated utility on the same element.
focus:ring-opacity-70on this line uses the same deprecated pattern being replaced in this PR. For consistency, consider updating it to use the shorthand syntax as well.♻️ Suggested fix
- className="container mx-auto flex h-40 scale-100 transform-gpu cursor-pointer flex-col items-center justify-center space-y-4 rounded-xl outline-none transition hover:scale-105 focus:outline-none focus:ring focus:ring-indigo-500 focus:ring-opacity-70" + className="container mx-auto flex h-40 scale-100 transform-gpu cursor-pointer flex-col items-center justify-center space-y-4 rounded-xl outline-none transition hover:scale-105 focus:outline-none focus:ring focus:ring-indigo-500/70"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/RequestModal/SearchByNameModal/index.tsx` at line 83, Update the deprecated focus:ring-opacity-70 pattern in the className string inside the SearchByNameModal component (index.tsx) by removing the separate focus:ring-opacity-70 utility and instead using the shorthand opacity form on the ring color utility (e.g., convert the pair "focus:ring-indigo-500" + "focus:ring-opacity-70" into a single "focus:ring-indigo-500/70" so the className uses the shorthand opacity syntax).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/Common/StatusBadgeMini/index.tsx`:
- Around line 54-56: Replace the invalid Tailwind classes in the StatusBadgeMini
component where badgeStyle.push(...) adds 'bg-red-500/80 border-white-400
ring-white-400 text-white'; change the border and ring classes to valid Tailwind
tokens (e.g., 'border-white ring-white') so the push call uses 'bg-red-500/80
border-white ring-white text-white' in the StatusBadgeMini/index.tsx.
---
Outside diff comments:
In `@src/components/Common/Dropdown/index.tsx`:
- Around line 94-99: The primary Dropdown button (in the Dropdown component
where className is composed based on buttonType) is missing its base background;
update the non-ghost branch that currently applies border/active classes to also
include a base background and hover fill (e.g., add bg-indigo-600/80 and
hover:bg-indigo-600 alongside the existing 'focus:ring-blue border-indigo-500/80
hover:border-indigo-500 active:border-indigo-700 active:bg-indigo-700') so the
Dropdown button matches Button and ButtonWithDropdown styling while leaving the
'ghost' branch unchanged.
In
`@src/components/UserProfile/UserSettings/UserLinkedAccountsSettings/index.tsx`:
- Around line 102-111: In the catch block inside UserLinkedAccountsSettings
(index.tsx) you currently call setError for specific cases (401 and 422) but
then unconditionally call setError(intl.formatMessage(messages.errorUnknown)),
which overwrites those specific messages; remove the final unconditional
setError call so that only the specific error handlers (e?.response?.status ===
401, 422) or the final else branch set the error message, leaving the specific
messages intact.
---
Nitpick comments:
In `@src/components/RequestModal/SearchByNameModal/index.tsx`:
- Line 83: Update the deprecated focus:ring-opacity-70 pattern in the className
string inside the SearchByNameModal component (index.tsx) by removing the
separate focus:ring-opacity-70 utility and instead using the shorthand opacity
form on the ring color utility (e.g., convert the pair "focus:ring-indigo-500" +
"focus:ring-opacity-70" into a single "focus:ring-indigo-500/70" so the
className uses the shorthand opacity syntax).
There was a problem hiding this comment.
Pull request overview
This pull request refactors Tailwind CSS utility classes to replace deprecated bg-opacity-XX syntax with the new Tailwind v4-compatible shorthand color/opacity notation (e.g., bg-gray-800/50 instead of bg-gray-800 bg-opacity-50). This is part of a larger effort to upgrade from Tailwind v3 to v4 as outlined in issue #2541.
Changes:
- Converted all
bg-opacity-XXutilities to inline color/opacity syntax (bg-color/XX) - Updated hover states from
hover:bg-opacity-100to explicit color classes (e.g.,hover:bg-indigo-600) - Standardized opacity notation across all components and stylesheets
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/styles/globals.css | Updated global CSS utilities with new opacity syntax for service banners and input action buttons |
| src/components/UserProfile/index.tsx | Converted card background opacity notation |
| src/components/UserProfile/UserSettings/UserLinkedAccountsSettings/index.tsx | Updated linked account card background opacity |
| src/components/TitleCard/index.tsx | Converted media type badges and loading overlay opacity syntax |
| src/components/StatusBadge/index.tsx | Updated status badge background and progress indicator opacity |
| src/components/Setup/index.tsx | Converted setup navigation and form background opacity |
| src/components/Settings/SettingsLogs/index.tsx | Updated code element background opacity |
| src/components/Settings/SettingsJobsCache/index.tsx | Converted code element background opacity |
| src/components/Settings/SettingsAbout/index.tsx | Updated alert and code element background opacity |
| src/components/Settings/Notifications/NotificationsTelegram.tsx | Converted code element background opacity |
| src/components/ResetPassword/index.tsx | Updated form container background opacity |
| src/components/ResetPassword/RequestResetLink.tsx | Converted form container background opacity |
| src/components/RequestModal/TvRequestModal.tsx | Updated table header background opacity |
| src/components/RequestModal/SearchByNameModal/index.tsx | Converted search result card background opacity |
| src/components/RequestModal/CollectionRequestModal.tsx | Updated table header background opacity |
| src/components/Login/index.tsx | Converted login form background opacity |
| src/components/Layout/index.tsx | Updated searchbar background opacity |
| src/components/Layout/UserDropdown/index.tsx | Converted dropdown menu background opacity |
| src/components/Layout/SearchInput/index.tsx | Updated search input background and focus state opacity |
| src/components/Layout/MobileMenu/index.tsx | Converted mobile menu background opacity |
| src/components/IssueModal/CreateIssueModal/index.tsx | Updated issue type selection background opacity |
| src/components/GenreCard/index.tsx | Converted genre card background and overlay opacity |
| src/components/Discover/index.tsx | Updated edit button and menu background opacity |
| src/components/Common/StatusBadgeMini/index.tsx | Converted all status badge background opacity and fixed invalid color classes |
| src/components/Common/SlideOver/index.tsx | Updated slide-over overlay and content background opacity |
| src/components/Common/Modal/index.tsx | Converted modal overlay background opacity |
| src/components/Common/Dropdown/index.tsx | Updated dropdown items and button styling (contains issue) |
| src/components/Common/ButtonWithDropdown/index.tsx | Converted button background and hover state opacity |
| src/components/Common/Button/index.tsx | Updated all button type background opacity and hover states |
| src/components/Common/Badge/index.tsx | Converted all badge type background opacity and hover states |
| src/components/Common/Alert/index.tsx | Updated alert background opacity |
| src/components/Blocklist/index.tsx | Converted media type badge background opacity |
| src/components/AppDataWarning/index.tsx | Updated code element background opacity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace deprecated tailwind utilities that can not be autmatically replaced by the code-mod. see seerr-team#2541
66450a0 to
742860c
Compare
|
@gauthier-th thanks for the review. As I am fairly new here: May I squash the 3 commits before merging? I am asking, because
|
Commits will be squashed once the PR will be merged. |
No need. When we merge, we squash and merge anyways |
|
Interesting. I am a bit confused as to why we need to follow Conventional Commits in the PR, if the commits are systematically squashed and re-worded. I am sure I'll end up understanding why we do it this way... I found it quite the overhead while developing. |
Squash and merge is something we decided later on. Previously we used to merge with merge commit. The only thing that happens is if you don't have your first commit atleast as conventional commits, it automatically sets that as the title without the conventional commit. And the pr title is what ends up as the squash commit messags. Sometimes there could be a human error but we recently also added a check to check for that as well for the pr title |
No, we changed this setting. The default title for the squashed commit is now the PR title. |
Ah forgot |
|
@fallenbagel sorry to ping you here. I am still quite new to the processes we have in this repo. I am wondering if there is something I still need to do on my side, in order to get this merged. I am looking forward to have this PR in to start working on the PS: Well, l am not looking forward to the actual migration. That will be quite a beast 😭 |
It just needs one more review ;) Most of us have been a bit busy so wasnt able to review |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/seerr-team/seerr](https://github.com/seerr-team/seerr) | minor | `v3.0.1` → `v3.1.0` | | [seerr-team/seerr](https://github.com/seerr-team/seerr) | minor | `v3.0.1` → `v3.1.0` | --- ### Release Notes <details> <summary>seerr-team/seerr (ghcr.io/seerr-team/seerr)</summary> ### [`v3.1.0`](https://github.com/seerr-team/seerr/releases/tag/v3.1.0) [Compare Source](seerr-team/seerr@v3.0.1...v3.1.0) ##### 🛡️ Security - Patch [CVE-2026-27707](GHSA-rc4w-7m3r-c2f7) - Unauthenticated account registration on Plex-configured Seerr instances via Jellyfin authentication endpoint - ([4ae2068](seerr-team/seerr@4ae2068)) - Patch [CVE-2026-27793](GHSA-f7xw-jcqr-57hp) - Broken Object-Level Authorization in User Profile Endpoint Exposes Third-Party Notification Credentials - ([4f089b2](seerr-team/seerr@4f089b2)) - Patch [CVE-2026-27792](GHSA-gx3h-3jg5-q65f) - Missing authentication on pushSubscription endpoints - ([946bdecec](seerr-team/seerr@946bdec)) ##### 🚀 Features - *(helm)* Use an existing PVC as config volume ([#​2447](seerr-team/seerr#2447)) - ([8f0c904](seerr-team/seerr@8f0c904)) - *(servarr-api)* Make Servarr API request timeout configurable ([#​2556](seerr-team/seerr#2556)) - ([3bcb4da](seerr-team/seerr@3bcb4da)) - Self-host font for better privacy ([#​2540](seerr-team/seerr#2540)) - ([10ea21b](seerr-team/seerr@10ea21b)) ##### 🐛 Bug Fixes - *(helm)* Add "v" as prefix for appVersion tag ([#​2445](seerr-team/seerr#2445)) - ([04b9d87](seerr-team/seerr@04b9d87)) - *(jellyfin-scanner)* Include unmatched seasons in processable seasons ([#​2538](seerr-team/seerr#2538)) - ([68f56d2](seerr-team/seerr@68f56d2)) - *(link-account)* Fix error-message override ([#​2547](seerr-team/seerr#2547)) - ([b843be0](seerr-team/seerr@b843be0)) - *(plex-scanner)* Add TVDb to TMDB fallback in plex scanner ([#​2537](seerr-team/seerr#2537)) - ([7c60a5c](seerr-team/seerr@7c60a5c)) - *(radarr)* Trigger search for existing monitored movies without files ([#​2391](seerr-team/seerr#2391)) - ([55776ea](seerr-team/seerr@55776ea)) - *(servarr)* Increase default API timeout from 5000ms to 10000ms ([#​2442](seerr-team/seerr#2442)) - ([b499976](seerr-team/seerr@b499976)) - *(sonarr)* Use configured metadata provider for season filtering ([#​2516](seerr-team/seerr#2516)) - ([5013d1d](seerr-team/seerr@5013d1d)) - *(watch-data)* Use sentinel values to avoid invalid SQL syntax ([#​2552](seerr-team/seerr#2552)) - ([947f70c](seerr-team/seerr@947f70c)) - *(watchlist-sync)* Correct permission typo for TV auto requests ([#​2488](seerr-team/seerr#2488)) - ([e0e4b6f](seerr-team/seerr@e0e4b6f)) - Preserve blocklist on media deletion & optimise watchlist-sync ([#​2478](seerr-team/seerr#2478)) - ([9da8bb6](seerr-team/seerr@9da8bb6)) ##### 🚜 Refactor - *(tailwind)* Replace deprecated tailwind utilities ([#​2542](seerr-team/seerr#2542)) - ([f42a4ec](seerr-team/seerr@f42a4ec)) ##### 📖 Documentation - *(synology)* Add installation guide via SynoCommunity ([#​2503](seerr-team/seerr#2503)) - ([0e636a3](seerr-team/seerr@0e636a3)) - *(truenas)* Update install/migration guide ([#​2491](seerr-team/seerr#2491)) - ([dc1734d](seerr-team/seerr@dc1734d)) - *(unraid)* Improve unraid migration guide ([#​2470](seerr-team/seerr#2470)) - ([5e64d49](seerr-team/seerr@5e64d49)) - Update Unraid install and migration guides with dual permission methods ([#​2532](seerr-team/seerr#2532)) - ([a0d0eb1](seerr-team/seerr@a0d0eb1)) - Add a warning in migration-guide for third party installation ([#​2527](seerr-team/seerr#2527)) - ([7e9dff3](seerr-team/seerr@7e9dff3)) - Remove double quotes (") from DB\_HOST environment variable ([#​2514](seerr-team/seerr#2514)) - ([fa905be](seerr-team/seerr@fa905be)) - Add Unraid installation and migration guide ([#​2440](seerr-team/seerr#2440)) - ([b6a9132](seerr-team/seerr@b6a9132)) - Fix migration guide title ([#​2425](seerr-team/seerr#2425)) - ([39ae32f](seerr-team/seerr@39ae32f)) ##### ⚡ Performance - Add missing indexes on all foreign key columns ([#​2461](seerr-team/seerr#2461)) - ([c6bcfe0](seerr-team/seerr@c6bcfe0)) ##### ⚙️ Miscellaneous Tasks - *(changelog)* Fix changelog template ([#​2431](seerr-team/seerr#2431)) - ([c2977f6](seerr-team/seerr@c2977f6)) - *(eslint)* Add react/self-closing-comp ([#​2563](seerr-team/seerr#2563)) - ([cd8b386](seerr-team/seerr@cd8b386)) - *(github)* Add docs and maintenance issue templates ([#​2467](seerr-team/seerr#2467)) - ([cf4883a](seerr-team/seerr@cf4883a)) - *(helm)* Add GatewayAPI route support to helm chart ([#​2544](seerr-team/seerr#2544)) - ([3a42f59](seerr-team/seerr@3a42f59)) - *(helm)* Update ghcr.io/seerr-team/seerr ( 3.0.0 → 3.0.1 ) \[skip-ci] ([#​2441](seerr-team/seerr#2441)) - ([87fb0df](seerr-team/seerr@87fb0df)) - *(husky)* Fixed husky commit message from bash/zsh syntax to sh syntax ([#​2572](seerr-team/seerr#2572)) - ([a00c9e5](seerr-team/seerr@a00c9e5)) - *(release)* Prepare ${TAG\_VERSION} - ([94a70bb](seerr-team/seerr@94a70bb)) - Updated the Contributing and Security guides to reflect our current practices ([#​2579](seerr-team/seerr#2579)) - ([0d40a42](seerr-team/seerr@0d40a42)) - Disable nextjs telemetry ([#​2517](seerr-team/seerr#2517)) - ([cecdd63](seerr-team/seerr@cecdd63)) - Update contributing guide regarding Automated AI Agent ([#​2518](seerr-team/seerr#2518)) - ([880fbc9](seerr-team/seerr@880fbc9)) - Remove discord notification from release ([#​2501](seerr-team/seerr#2501)) - ([fba20c1](seerr-team/seerr@fba20c1)) - Add create-tag workflow to streamline release process ([#​2493](seerr-team/seerr#2493)) - ([06e5eb0](seerr-team/seerr@06e5eb0)) - Update concurrency logic ([#​2481](seerr-team/seerr#2481)) - ([4939f13](seerr-team/seerr@4939f13)) - Add semantic-pr workflow to enforce conventional commits ([#​2472](seerr-team/seerr#2472)) - ([5e57fdc](seerr-team/seerr@5e57fdc)) ##### New Contributors ❤️ - [@​caillou](https://github.com/caillou) made their first contribution - [@​Kenshin9977](https://github.com/Kenshin9977) made their first contribution - [@​MagicLegend](https://github.com/MagicLegend) made their first contribution - [@​wiiaam](https://github.com/wiiaam) made their first contribution - [@​mjonkus](https://github.com/mjonkus) made their first contribution - [@​nova-api](https://github.com/nova-api) made their first contribution - [@​mreid-tt](https://github.com/mreid-tt) made their first contribution - [@​DataBitz](https://github.com/DataBitz) made their first contribution - [@​Hyperion2220](https://github.com/Hyperion2220) made their first contribution - [@​blassley](https://github.com/blassley) made their first contribution - [@​JanKleine](https://github.com/JanKleine) made their first contribution - [@​koiralasandesh](https://github.com/koiralasandesh) made their first contribution<!-- generated by git-cliff --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNS43IiwidXBkYXRlZEluVmVyIjoiNDMuMjUuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/4284 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Description
Replace deprecated tailwind utilities that can not be automatically replaced by the code-mod.
see #2541
How Has This Been Tested?
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit