Skip to content

feat: lifestyle tabs ui match#95

Merged
GilHeller merged 3 commits into
mainfrom
lifestyle-ui-match
Jun 25, 2026
Merged

feat: lifestyle tabs ui match#95
GilHeller merged 3 commits into
mainfrom
lifestyle-ui-match

Conversation

@tg14102005-a11y

@tg14102005-a11y tg14102005-a11y commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Description

צילום מסך 2026-06-24 ב-23 26 24 צילום מסך 2026-06-24 ב-23 26 24

Match Lifestyle page UI to design mockups.

Changes:

  • Added SGLSwitch tabs (תזונה / פיזיותרפיה ואימונים)
  • Added SGLBrainHQ card above tabs
  • Added translation keys for all 4 languages
  • Created styles.ts for LifeStyle page

Related Issue(s)

Fixes # (issue number)

Checklist:

  • [ v] I have performed a self-review of my own code
  • [v ] My changes generate no new warnings

Screenshots (if appropriate):

Summary by CodeRabbit

  • New Features
    • Added a tabbed lifestyle screen that lets users switch between diet/nutrition and physiotherapy/training.
    • Displays diet content on the diet tab and physiotherapy/training content on the physio tab.
  • Localization
    • Added new lifestyle tab labels for Arabic, English, Hebrew, and Russian (“Diet” and “Physiotherapy & Training”).
  • UI Improvements
    • Updated the lifestyle page layout and styling to better organize the top controls and content area.

@tg14102005-a11y tg14102005-a11y requested a review from Tamir198 June 24, 2026 20:27
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@tg14102005-a11y, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 6 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5313d653-471e-4d26-bbef-6d45a0076b54

📥 Commits

Reviewing files that changed from the base of the PR and between e0cca6f and d8c7af6.

📒 Files selected for processing (4)
  • src/locales/ar/translation.json
  • src/locales/en/translation.json
  • src/locales/he/translation.json
  • src/locales/ru/translation.json
📝 Walkthrough

Walkthrough

Adds localized lifestyle tab labels in four languages and changes the LifeStyle page to switch between diet and physio/training content with a tab control.

Changes

Lifestyle tab navigation

Layer / File(s) Summary
Lifestyle tab translations
src/locales/ar/translation.json, src/locales/en/translation.json, src/locales/he/translation.json, src/locales/ru/translation.json
Adds lifestyle.tab.diet and lifestyle.tab.physio entries to the Arabic, English, Hebrew, and Russian locale files.
Tabbed lifestyle page
src/pages/lifeStyle/LifeStyle.tsx, src/pages/lifeStyle/constants.ts, src/pages/lifeStyle/styles.ts
Turns LifeStyle into a tab-driven page with active tab state, translated switch options, conditional rendering for diet versus physio content, and new layout styles and tab constants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Tamir198
  • GilHeller

Poem

I hopped through tabs with joyful grace,
Four tongues of labels found their place.
Diet or physio, one switch to choose,
My bunny feet approve these views.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: Lifestyle page tabs/UI updates.
Description check ✅ Passed The template sections are present and the summary/screenshots are mostly complete, though the related issue and checklist entries are still placeholders.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lifestyle-ui-match

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.

Comment thread src/pages/lifeStyle/LifeStyle.tsx Outdated
import * as styles from './styles'

const TAB_DIET = 'diet'
const TAB_PHYSIO = 'physio'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would save those inside constant file

Comment thread src/pages/lifeStyle/LifeStyle.tsx Outdated
<RecomendationTraining />
<DietTabExample />
</>
<Box sx={styles.containerStyle}>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why do you need box from mui and not regular div? or even use the existing container component:

src/components/UI/Container/SGLContainer.tsx

Comment thread src/pages/lifeStyle/LifeStyle.tsx Outdated
<Box sx={styles.switchWrapperStyle}>
<SGLSwitch options={options} value={activeTab} onChange={setActiveTab} />
</Box>
{activeTab === TAB_DIET && <DietTabExample />}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are only 2 tabs, so you can do {activeTab === TAB_DIET ? : }

Comment thread src/pages/lifeStyle/styles.ts Outdated
@@ -0,0 +1,12 @@
export const containerStyle = {
display: 'flex',
flexDirection: 'column' as const,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do you need as const in here? you can make this object satisfy CSSProperties instead

pnpm dev

pnpm dev
'
@tg14102005-a11y tg14102005-a11y requested a review from Tamir198 June 25, 2026 18:25

@GilHeller GilHeller left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, but you have a conflict. Please fix it

@tg14102005-a11y

tg14102005-a11y commented Jun 25, 2026 via email

Copy link
Copy Markdown
Collaborator Author

@GilHeller GilHeller merged commit afcf52e into main Jun 25, 2026
2 checks passed
@GilHeller GilHeller deleted the lifestyle-ui-match branch June 25, 2026 19:47
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.

3 participants