Skip to content

Commit f040206

Browse files
kasyaarkid15r
andauthored
Upgrade TailwindCSS to v.4.1.12 (#2153)
* Upgrade TailwindCSS to v.4 * Update classes * Update classes and apply Code Rabbit suggestions * Fix tests * Apply suggestions * Update code --------- Co-authored-by: Arkadii Yakovets <[email protected]>
1 parent 01ee255 commit f040206

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2253
-983
lines changed

frontend/__tests__/unit/components/Footer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ describe('Footer', () => {
316316
expect(footer).toHaveClass(
317317
'mt-auto',
318318
'w-full',
319-
'border-t',
319+
'border-t-1',
320320
'bg-slate-200',
321321
'dark:bg-slate-800',
322322
'xl:max-w-full'

frontend/__tests__/unit/components/LoginPageContent.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,9 @@ describe('LoginPageContent', () => {
467467
expect(loginCard).toHaveClass(
468468
'w-full',
469469
'max-w-sm',
470-
'space-y-6',
470+
'flex',
471+
'flex-col',
472+
'gap-6',
471473
'rounded-2xl',
472474
'border',
473475
'border-gray-200',

frontend/__tests__/unit/components/MultiSearch.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe('Rendering', () => {
146146
'h-12',
147147
'w-full',
148148
'rounded-lg',
149-
'border',
149+
'border-1',
150150
'border-gray-300',
151151
'pl-10',
152152
'pr-10',

frontend/__tests__/unit/components/NavButton.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ describe('<NavButton />', () => {
213213
'hover:ring-1',
214214
'hover:ring-[#b0c7de]',
215215
'hover:ring-offset-0',
216-
'focus-visible:outline-none',
216+
'focus-visible:outline-hidden',
217217
'focus-visible:ring-1',
218218
'focus-visible:ring-ring'
219219
)
@@ -323,7 +323,7 @@ describe('<NavButton />', () => {
323323
it('should maintain focus visibility with focus-visible classes', () => {
324324
renderNavButton()
325325
const link = screen.getByRole('link')
326-
expect(link).toHaveClass('focus-visible:outline-none', 'focus-visible:ring-1')
326+
expect(link).toHaveClass('focus-visible:outline-hidden', 'focus-visible:ring-1')
327327
})
328328
})
329329

frontend/__tests__/unit/components/Search.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ describe('SearchBar Component', () => {
335335
render(<SearchBar {...defaultProps} isLoaded={false} />)
336336
const input = screen.getByPlaceholderText('Search projects...')
337337
expect(input).toHaveClass(
338-
'h-12 w-full rounded-lg border border-gray-300 pl-10 pr-10 text-lg text-black focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:focus:border-blue-300 dark:focus:ring-blue-300'
338+
'h-12 w-full rounded-lg border-1 border-gray-300 pl-10 pr-10 text-lg text-black focus:border-blue-500 focus:outline-hidden focus:ring-2 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:focus:border-blue-300 dark:focus:ring-blue-300'
339339
)
340340
})
341341

@@ -351,7 +351,7 @@ describe('SearchBar Component', () => {
351351
fireEvent.change(input, { target: { value: 'test' } })
352352
const clearButton = container.querySelector('button.absolute.rounded-full[class*="right-2"]')
353353
expect(clearButton).toHaveClass(
354-
'absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-1 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-300'
354+
'absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-1 hover:bg-gray-100 focus:outline-hidden focus:ring-2 focus:ring-gray-300'
355355
)
356356
})
357357

frontend/__tests__/unit/components/UserMenu.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ describe('UserMenu Component', () => {
691691
expect(container).toHaveClass('relative', 'flex', 'items-center', 'justify-center')
692692

693693
const avatarButton = screen.getByRole('button')
694-
expect(avatarButton).toHaveClass('w-auto', 'focus:outline-none')
694+
expect(avatarButton).toHaveClass('w-auto', 'focus:outline-hidden')
695695
})
696696

697697
it('applies correct CSS classes to dropdown menu', async () => {

frontend/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ COPY --chmod=444 package.json pnpm-lock.yaml ./
2727
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
2828
pnpm install --frozen-lockfile --ignore-scripts
2929

30-
COPY --chmod=444 .env .pnpmrc next.config.ts postcss.config.js tailwind.config.js tsconfig.json ./
30+
COPY --chmod=444 .env .pnpmrc next.config.ts postcss.config.js tailwind.config.mjs tsconfig.json ./
3131
COPY --chmod=555 public public
3232
COPY --chmod=555 src src
3333

frontend/docker/Dockerfile.e2e.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
1919

2020
COPY __tests__/e2e __tests__/e2e
2121
COPY __tests__/unit/data __tests__/unit/data
22-
COPY .pnpmrc next.config.ts postcss.config.js playwright.config.ts tailwind.config.js tsconfig.json ./
22+
COPY .pnpmrc next.config.ts postcss.config.js playwright.config.ts tailwind.config.mjs tsconfig.json ./
2323
COPY public public
2424
COPY src src

frontend/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"clsx": "^2.1.1",
4444
"core-js": "^3.45.1",
4545
"date-fns": "^4.1.0",
46-
"dayjs": "^1.11.15",
46+
"dayjs": "^1.11.17",
4747
"dompurify": "^3.2.6",
4848
"eslint-plugin-import": "^2.32.0",
4949
"framer-motion": "^12.23.12",
@@ -85,7 +85,6 @@
8585
"@types/react-gtm-module": "^2.0.4",
8686
"@typescript-eslint/eslint-plugin": "^8.41.0",
8787
"@typescript-eslint/parser": "^8.41.0",
88-
"autoprefixer": "^10.4.21",
8988
"eslint": "^9.34.0",
9089
"eslint-config-next": "^15.5.2",
9190
"eslint-config-prettier": "^10.1.8",
@@ -106,7 +105,7 @@
106105
"prettier": "^3.6.2",
107106
"prettier-plugin-tailwindcss": "^0.6.14",
108107
"require-in-the-middle": "^7.5.2",
109-
"tailwindcss": "^3.4.17",
108+
"tailwindcss": "^4.1.12",
110109
"ts-jest": "^29.4.1",
111110
"ts-node": "^10.9.2",
112111
"typescript": "~5.8.3",

0 commit comments

Comments
 (0)