Skip to content

[Feature] Mobile screens adaptation - #33

Merged
AnastasiaRakuta merged 12 commits into
devfrom
feature/mobile-screens-adaptation
Aug 12, 2026
Merged

[Feature] Mobile screens adaptation#33
AnastasiaRakuta merged 12 commits into
devfrom
feature/mobile-screens-adaptation

Conversation

@AnastasiaRakuta

@AnastasiaRakuta AnastasiaRakuta commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added responsive mobile navigation with a drawer, active-route highlighting, and localized navigation actions.
    • Added a localized “Filter by date” label for news search.
  • Improvements
    • Improved responsive layouts across authentication, cabinet, news, and form screens.
    • News administration tables now display as mobile-friendly cards.
    • News search, cards, inputs, and action controls adapt better to smaller screens.
  • Bug Fixes
    • Reduced horizontal overflow and improved page-width handling across the application.
    • Mobile navigation prevents background scrolling while open.

@AnastasiaRakuta AnastasiaRakuta self-assigned this Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@AnastasiaRakuta, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a16bd3c0-acf6-4849-9376-2d2d6bb7da78

📥 Commits

Reviewing files that changed from the base of the PR and between b501ef3 and 7ec4cfe.

📒 Files selected for processing (11)
  • public/i18n/en/common.json
  • public/i18n/uk/common.json
  • src/App.tsx
  • src/layout/CabinetLayout.tsx
  • src/layout/Header.tsx
  • src/pages/CabinetPanel/CabinetPanel.tsx
  • src/pages/admin/News/NewsAdminList.tsx
  • src/pages/user/News/NewsArchive.test.tsx
  • src/pages/user/News/NewsList.test.tsx
  • src/pages/user/News/NewsSearch.test.tsx
  • src/shared/components/MobileNavDrawer.tsx
📝 Walkthrough

Walkthrough

The application adds responsive cabinet navigation, mobile drawers, responsive news and form layouts, fluid shared inputs, global overflow handling, and localized date-filter labels. CabinetLayout moves from src/pages to src/layout.

Changes

Cabinet navigation and mobile drawer

Layer / File(s) Summary
Cabinet navigation and mobile drawer
src/layout/*, src/pages/CabinetPanel/*, src/shared/components/MobileNavDrawer.tsx, src/shared/hooks/useLockBodyScroll.ts, src/App.tsx
The cabinet layout now renders responsive navigation, mobile drawer controls, nested routes, and body-scroll locking. Navigation closes after selection and preserves conditional links.

Page shell and shared input sizing

Layer / File(s) Summary
Page shell and shared input sizing
src/index.css, src/layout/MainLayout.tsx, src/pages/auth/*, src/shared/components/Input.*
Global containers, authentication forms, and inputs now use responsive widths, spacing, and overflow handling.

News page and administration layouts

Layer / File(s) Summary
News page and administration layouts
src/pages/user/News/*, src/pages/admin/News/*, public/i18n/*/common.json
News cards, lists, search controls, administration tables, and forms now adapt to small screens. Search and date-filter labels use the common translation namespace.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: witoldark

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Header
  participant MobileNavDrawer
  participant Router
  User->>Header: Select menu button
  Header->>MobileNavDrawer: Set drawer open
  MobileNavDrawer->>Router: Navigate to selected link
  Router-->>MobileNavDrawer: Update active route
  MobileNavDrawer->>Header: Close drawer
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary changes, which adapt layouts and navigation for mobile screens.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/mobile-screens-adaptation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
src/layout/Header.tsx (1)

32-40: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Prefer Tailwind CSS v4 canonical utility syntax.

Tailwind CSS v4 supports these legacy forms, but marks them as deprecated. Replace them with text-xl!, md:text-[2.2rem]!, and shrink-0.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/layout/Header.tsx` around lines 32 - 40, Update the Header title classes
to use Tailwind CSS v4 canonical important syntax, replacing !text-xl with
text-xl! and md:!text-[2.2rem] with md:text-[2.2rem]!, and replace flex-shrink-0
with shrink-0 on the adjacent container.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/layout/CabinetLayout.tsx`:
- Around line 17-19: Add type="button" and an appropriate localized accessible
label to the icon-only open control in CabinetLayout.tsx lines 17-19, and to the
icon-only close control in CabinetPanel.tsx lines 39-41; preserve their existing
click handlers and use labels that clearly identify opening and closing cabinet
navigation.

In `@src/pages/admin/News/NewsAdmin.module.scss`:
- Around line 102-104: Replace the thead display:none rule in the responsive
table styles with a visually hidden technique that preserves the header in the
accessibility tree while removing it from visual layout. Keep the mobile table
presentation and existing data-label behavior unchanged.

In `@src/pages/admin/News/NewsAdminList.tsx`:
- Around line 94-96: Update the create link in the NewsAdminList component to
include an aria-label using the existing translated create-button text, and mark
its Font Awesome icon as decorative with aria-hidden. Preserve the responsive
visible text behavior for larger screens.

In `@src/pages/CabinetPanel/CabinetPanel.tsx`:
- Around line 34-36: Update the sidebar rendering around the aside in
CabinetPanel so a closed mobile drawer is hidden and removed from keyboard
interaction, while the desktop sidebar remains visible at lg and above. Preserve
the existing open behavior and responsive positioning.

---

Nitpick comments:
In `@src/layout/Header.tsx`:
- Around line 32-40: Update the Header title classes to use Tailwind CSS v4
canonical important syntax, replacing !text-xl with text-xl! and
md:!text-[2.2rem] with md:text-[2.2rem]!, and replace flex-shrink-0 with
shrink-0 on the adjacent container.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ca0c428a-d52d-4723-9dbc-f6f25655c8d4

📥 Commits

Reviewing files that changed from the base of the PR and between 9d9f1f6 and b501ef3.

📒 Files selected for processing (24)
  • .gitignore
  • public/i18n/en/common.json
  • public/i18n/uk/common.json
  • src/App.tsx
  • src/index.css
  • src/layout/CabinetLayout.tsx
  • src/layout/Header.module.scss
  • src/layout/Header.tsx
  • src/layout/MainLayout.tsx
  • src/pages/CabinetLayout.tsx
  • src/pages/CabinetPanel/CabinetPanel.tsx
  • src/pages/admin/News/NewsAdmin.module.scss
  • src/pages/admin/News/NewsAdminList.tsx
  • src/pages/admin/News/NewsAdminRow.tsx
  • src/pages/admin/News/NewsForm.tsx
  • src/pages/auth/Auth.module.scss
  • src/pages/auth/AuthLayout.tsx
  • src/pages/user/News/NewsCard.tsx
  • src/pages/user/News/NewsList.tsx
  • src/pages/user/News/NewsSearch.tsx
  • src/shared/components/Input.module.scss
  • src/shared/components/Input.tsx
  • src/shared/components/MobileNavDrawer.tsx
  • src/shared/hooks/useLockBodyScroll.ts
💤 Files with no reviewable changes (1)
  • src/pages/CabinetLayout.tsx

Comment thread src/layout/CabinetLayout.tsx Outdated
Comment on lines +102 to +104
thead {
display: none;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep table headers available to assistive technology.

At line 103, display: none removes the <thead> from the accessibility tree. The data-label generated content does not restore table-header associations. On mobile, screen reader users can receive cell values without their column meaning.

Use visually hidden styles for the header instead of display: none.

Proposed fix
 thead {
-  display: none;
+  position: absolute;
+  width: 1px;
+  height: 1px;
+  padding: 0;
+  margin: -1px;
+  overflow: hidden;
+  clip: rect(0, 0, 0, 0);
+  white-space: nowrap;
+  border: 0;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
thead {
display: none;
}
thead {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/admin/News/NewsAdmin.module.scss` around lines 102 - 104, Replace
the thead display:none rule in the responsive table styles with a visually
hidden technique that preserves the header in the accessibility tree while
removing it from visual layout. Keep the mobile table presentation and existing
data-label behavior unchanged.

Comment thread src/pages/admin/News/NewsAdminList.tsx Outdated
Comment thread src/pages/CabinetPanel/CabinetPanel.tsx Outdated
@sonarqubecloud

Copy link
Copy Markdown

@AnastasiaRakuta
AnastasiaRakuta merged commit 55d352a into dev Aug 12, 2026
4 checks passed
@AnastasiaRakuta
AnastasiaRakuta deleted the feature/mobile-screens-adaptation branch August 12, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant