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

Uniform landing page with theme-aware Hero #428

Merged
merged 3 commits into from
Mar 28, 2025
Merged

Conversation

avikalpg
Copy link
Member

@avikalpg avikalpg commented Mar 28, 2025

Summary by CodeRabbit

  • New Features

    • Introduced additional customer logos.
    • Enabled dynamic theme adaptation for a consistent user interface.
  • Style

    • Updated background and text color schemes across key sections such as the hero area, navbar, and informational blocks.
    • Refined button styling and heading sizes for improved readability and visual cohesion.

…ry background views. I have changed the background of all views to primary.
Copy link

vercel bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
team-monitor-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 5:08am

Copy link
Contributor

coderabbitai bot commented Mar 28, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request introduces theme-based enhancements in several view components. The changes add a state variable for the current theme and use a getPreferredTheme function to set it. Components such as CustomerLogos and Hero now render elements with conditional styles based on the theme. Additionally, multiple components have their styling classes updated—changing backgrounds from dark to primary and adjusting text and button styles accordingly.

Changes

Files Change Summary
views/CustomerLogos.tsx, views/Hero.tsx Added a state variable currentTheme and integrated getPreferredTheme for dynamic theming. In CustomerLogos, new logo imports (TagMangoLogo, SimplifyMoneyLogo) are added, the heading element is changed, and image classes update conditionally. In Hero, theme prop and multiple CSS classes are updated.
views/JoinDiscord.tsx, views/Navbar.tsx, views/WhyUs.tsx Updated CSS classes: background colors changed from bg-black to bg-primary (and variations thereof) across components. Text styling changes include removal of text-white and adjustments in class names to reflect the primary theme styling consistently.

Sequence Diagram(s)

sequenceDiagram
    participant C as Component (Customers/Hero)
    participant T as getPreferredTheme
    participant S as State
    participant UI as Rendered UI

    C->>T: Call getPreferredTheme()
    T-->>C: Return theme preference ("light" or "dark")
    C->>S: Set currentTheme based on returned value
    S-->>C: State updated
    C->>UI: Render component with theme-dependent styles
Loading

Possibly related PRs

Suggested reviewers

  • tapishr

Poem

I'm a rabbit with a joyful cheer,
Hopping through themes both far and near.
With primary hues and logos so bright,
Code changes make our UI just right.
Carrots and code, in whimsical delight!
🥕✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@avikalpg avikalpg changed the base branch from main to akg/addLogos March 28, 2025 04:31
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
views/CustomerLogos.tsx (2)

37-42: Remove console.log statement

There's a debugging console.log statement that should be removed before deploying to production.

 useEffect(() => {
-  console.log(getPreferredTheme())
   setCurrentTheme(getPreferredTheme());
 }, [])

46-52: Consider providing styling for dark theme

While the light theme applies a gradient text effect, no alternative styling is provided for dark theme. This may result in inconsistent appearance.

 <h4 className='px-4 text-[1rem] relative'>
   {'Trusted by '}
-  <span className={currentTheme === 'light' ? 'relative text-transparent bg-clip-text bg-gradient-to-r from-secondary to-[#6f117b]' : ''}>
+  <span className={currentTheme === 'light' 
+    ? 'relative text-transparent bg-clip-text bg-gradient-to-r from-secondary to-[#6f117b]' 
+    : 'relative text-secondary font-semibold'}>
     fast-moving
   </span>
   {' teams'}
 </h4>
views/Hero.tsx (1)

41-43: Consider adding a theme listener for dynamic theme changes.

The current implementation only sets the theme once when the component mounts. If the user changes their system theme preference while the component is mounted, the change won't be reflected.

React.useEffect(() => {
  setCurrentTheme(getPreferredTheme());
+ 
+ // Optional: Add a listener for theme changes
+ const handleThemeChange = () => {
+   setCurrentTheme(getPreferredTheme());
+ };
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', handleThemeChange);
+ 
+ return () => {
+   window.matchMedia('(prefers-color-scheme: dark)').removeEventListener('change', handleThemeChange);
+ };
}, [])
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb6812b and 77b2831.

⛔ Files ignored due to path filters (2)
  • public/simplifymoney-logo.png is excluded by !**/*.png
  • public/tagmango_logo.svg is excluded by !**/*.svg
📒 Files selected for processing (5)
  • views/CustomerLogos.tsx (3 hunks)
  • views/Hero.tsx (5 hunks)
  • views/JoinDiscord.tsx (2 hunks)
  • views/Navbar.tsx (1 hunks)
  • views/WhyUs.tsx (1 hunks)
🔇 Additional comments (17)
views/WhyUs.tsx (1)

35-35: Background color update looks good

The change to add the bg-primary class is consistent with the theme standardization in this PR. This helps create a uniform appearance across the landing page components.

views/JoinDiscord.tsx (3)

38-38: Background color update looks good

Changing from bg-black to bg-primary aligns with the uniform theming approach in this PR.


45-45: Ensure text visibility in both themes

The text-white class has been removed, making text color dependent on the theme. Verify that this text remains visible in both light and dark themes, as the heading needs to be clearly legible on the bg-primary background.


54-54: Ensure text visibility in both themes

Similar to the heading, please verify that the paragraph text remains visible in both light and dark themes after removing the text-white class.

views/Navbar.tsx (1)

91-91: Consistent background color update

The change from bg-black text-foreground text-primary-light to bg-primary text-foreground aligns with the theme standardization in this PR. This helps create a uniform appearance across components.

views/CustomerLogos.tsx (3)

15-18: New imports for theme management

The addition of new logos and theme management imports is good. This allows for theme-aware rendering of components.


30-33: Added new customer logos

The addition of SimplifyMoney and TagMango logos enhances the customer showcase section.


62-63: Good approach for theme-aware logo rendering

The conditional application of grayscale and invert effects for dark theme is a good approach for ensuring logos remain visible regardless of theme. This implementation makes logos adapt to the theme without requiring separate assets.

views/Hero.tsx (9)

10-10: Import of theme utilities added correctly.

This import adds the necessary functions for theme detection and the type definition, which will be used for the dynamic theming implementation.


15-15: Theme state implementation looks good.

The state is properly initialized with a default 'light' theme, which ensures a consistent default rendering state.


50-50: Background color update follows the new theme system.

Changing from bg-black to bg-primary makes the component respond to the theme configuration properly.


52-52: Text color update aligns with the theme system.

The change from text-primary-light to text-primary-foreground follows modern theming conventions where the text color is tied to its background context.


73-73: Simplified text styling.

Removing the text-gray-300 class lets the text inherit the parent's text color class, which is now theme-aware.


86-86: Button styling enhancement looks good.

The addition of font-semibold and border color classes improves the visual consistency of the button with the action color theme.


94-94: Text styling simplification.

The simplified class list retains the necessary responsive text sizing while allowing the text to inherit the parent's theme colors.


105-105: Background overlay follows the theme system.

Changing from bg-black/50 to bg-primary/50 ensures the overlay color is consistent with the main background while maintaining the same opacity.


109-109: Provider logos now use dynamic theme.

The change from hardcoded theme values to the currentTheme state ensures consistent theming across logos based on the user's preference.

Also applies to: 112-112

Copy link

vibinex-dpu bot commented Mar 28, 2025

Relevant users for this PR:

Contributor Name/Alias Relevance
avikalpg 91.67%
MuskanPaliwal 8.33%

Ignoring following files due to large size: - public/simplifymoney-logo.png

  • public/tagmango_logo.svg

Auto assigning to relevant reviewers.

If you are a relevant reviewer, you can use the Vibinex browser extension to see parts of the PR relevant to you
Relevance of the reviewer is calculated based on the git blame information of the PR. To know more, hit us up at [email protected].

To change comment and auto-assign settings, go to your Vibinex settings page.

Copy link

vibinex-dpu bot commented Mar 28, 2025

Diff Graph:

Call Stack Diff

%%{init: { 'theme': 'neutral', 'themeVariables': { 'fontSize': '20px' }, 'flowchart': { 'nodeSpacing': 100, 'rankSpacing': 100 } } }%%
 	flowchart LR
	subgraph yphq ["views/JoinDiscord.tsx"]

	end
	class yphq modified

	subgraph tvwh ["views/Navbar.tsx"]

	end
	class tvwh modified

	subgraph qqzx ["views/WhyUs.tsx"]

	end
	class qqzx modified

	subgraph jwqd ["views/CustomerLogos.tsx"]
	zhrw["Customers"]
	class zhrw modified
	click zhrw href "https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR36" _blank
	end
	class jwqd modified

	subgraph lxmy ["../utils/theme"]
	ozub["getPreferredTheme"]

	click ozub href "https://github.com/vibinex/vibinex-server/blob/eb6812b3b3c6c2668043ce3a3b33d7cc0ccbdadb/../utils/theme#L0" _blank
	end


	subgraph logg ["../utils/theme.ts"]
	qlwy["setCurrentTheme"]

	click qlwy href "https://github.com/vibinex/vibinex-server/blob/eb6812b3b3c6c2668043ce3a3b33d7cc0ccbdadb/../utils/theme.ts#L0" _blank
	zoaz["getPreferredTheme"]

	click zoaz href "https://github.com/vibinex/vibinex-server/blob/eb6812b3b3c6c2668043ce3a3b33d7cc0ccbdadb/../utils/theme.ts#L0" _blank
	end


	subgraph eibb ["views/Hero.tsx"]
	ceym["Hero"]
	class ceym modified
	click ceym href "https://github.com/vibinex/vibinex-server/pull/428/files#diff-51a577178391083660685a1714a7a42fd0be5eeb9490842d2cc54291644ed77aR12" _blank
	end
	class eibb modified

	subgraph delh ["public/tagmango_logo.svg"]

	end
	class delh green

	subgraph mwzy ["public/simplifymoney-logo.png"]

	end
	class mwzy green

	classDef modified stroke:black,fill:yellow
	classDef added stroke:black,fill:#b7e892,color:black
	classDef deleted stroke:black,fill:red
	zhrw =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR39'>Line 39</a>" =====>ozub
	zhrw =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR40'>Line 40</a>" =====>zoaz
	zhrw =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR40'>Line 40</a>" =====>qlwy
	ceym =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-51a577178391083660685a1714a7a42fd0be5eeb9490842d2cc54291644ed77aR41'>Line 41</a>" =====>zoaz

	linkStyle 0,1,2,3 stroke:green,stroke-width:8


Loading

To modify DiffGraph settings, go to your Vibinex settings page.

Copy link

vibinex-dpu bot commented Mar 28, 2025

Relevant users for this PR:

Contributor Name/Alias Relevance
avikalpg 90.91%
MuskanPaliwal 9.09%

Auto assigning to relevant reviewers.

If you are a relevant reviewer, you can use the Vibinex browser extension to see parts of the PR relevant to you
Relevance of the reviewer is calculated based on the git blame information of the PR. To know more, hit us up at [email protected].

To change comment and auto-assign settings, go to your Vibinex settings page.

Copy link

vibinex-dpu bot commented Mar 28, 2025

Diff Graph:

Call Stack Diff

%%{init: { 'theme': 'neutral', 'themeVariables': { 'fontSize': '20px' }, 'flowchart': { 'nodeSpacing': 100, 'rankSpacing': 100 } } }%%
 	flowchart LR
	subgraph xlef ["views/Hero.tsx"]
	jygs["Hero"]
	class jygs modified
	click jygs href "https://github.com/vibinex/vibinex-server/pull/428/files#diff-51a577178391083660685a1714a7a42fd0be5eeb9490842d2cc54291644ed77aR12" _blank
	end
	class xlef modified

	subgraph dgqv ["views/JoinDiscord.tsx"]

	end
	class dgqv modified

	subgraph pvvi ["views/WhyUs.tsx"]

	end
	class pvvi modified

	subgraph plhp ["../utils/theme.ts"]
	zjkx["getPreferredTheme"]

	click zjkx href "https://github.com/vibinex/vibinex-server/blob/a28d1f9fdee7b03f6b6747424b1ff25bf5c570de/../utils/theme.ts#L0" _blank
	end


	subgraph qbhz ["../utils/theme"]
	lzag["getPreferredTheme"]

	click lzag href "https://github.com/vibinex/vibinex-server/blob/a28d1f9fdee7b03f6b6747424b1ff25bf5c570de/../utils/theme#L0" _blank
	end


	subgraph xfpn ["views/CustomerLogos.tsx"]
	rrez["Customers"]
	class rrez modified
	click rrez href "https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR36" _blank
	end
	class xfpn modified

	subgraph hpvi ["views/Navbar.tsx"]

	end
	class hpvi modified

	classDef modified stroke:black,fill:yellow
	classDef added stroke:black,fill:#b7e892,color:black
	classDef deleted stroke:black,fill:red
	jygs =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-51a577178391083660685a1714a7a42fd0be5eeb9490842d2cc54291644ed77aR41'>Line 41</a>" =====>zjkx
	rrez =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR39'>Line 39</a>" =====>lzag

	linkStyle 0,1 stroke:green,stroke-width:8


Loading

To modify DiffGraph settings, go to your Vibinex settings page.

Base automatically changed from akg/addLogos to main March 28, 2025 06:15
Copy link

vibinex-dpu bot commented Mar 28, 2025

Relevant users for this PR:

Contributor Name/Alias Relevance Approval
avikalpg 90.91%
MuskanPaliwal 9.09%

Total Coverage for PR: 0.00%

If you are a relevant reviewer, you can use the Vibinex browser extension to see parts of the PR relevant to you
Relevance of the reviewer is calculated based on the git blame information of the PR. To know more, hit us up at [email protected].

To change comment and auto-assign settings, go to your Vibinex repository settings page.

@avikalpg avikalpg merged commit 42f8d82 into main Mar 28, 2025
5 checks passed
@avikalpg avikalpg deleted the akg/uniform_landing_page branch March 28, 2025 06:27
Copy link

vibinex-dpu bot commented Mar 28, 2025

Relevant users for this PR:

Contributor Name/Alias Relevance
avikalpg 90.91%
MuskanPaliwal 9.09%

Auto assigning to relevant reviewers.

If you are a relevant reviewer, you can use the Vibinex browser extension to see parts of the PR relevant to you
Relevance of the reviewer is calculated based on the git blame information of the PR. To know more, hit us up at [email protected].

To change comment and auto-assign settings, go to your Vibinex settings page.

Copy link

vibinex-dpu bot commented Mar 28, 2025

Diff Graph:

Call Stack Diff

%%{init: { 'theme': 'neutral', 'themeVariables': { 'fontSize': '20px' }, 'flowchart': { 'nodeSpacing': 100, 'rankSpacing': 100 } } }%%
 	flowchart LR
	subgraph ubid ["views/WhyUs.tsx"]

	end
	class ubid modified

	subgraph srmy ["../utils/theme.ts"]
	tvry["getPreferredTheme"]

	click tvry href "https://github.com/vibinex/vibinex-server/blob/e3ccac5db246c80a75af54233532985f87d54c6f/../utils/theme.ts#L0" _blank
	end


	subgraph lmsu ["views/JoinDiscord.tsx"]

	end
	class lmsu modified

	subgraph lijp ["views/CustomerLogos.tsx"]
	fdci["Customers"]
	class fdci modified
	click fdci href "https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR36" _blank
	end
	class lijp modified

	subgraph pwfr ["views/Hero.tsx"]
	eurm["Hero"]
	class eurm modified
	click eurm href "https://github.com/vibinex/vibinex-server/pull/428/files#diff-51a577178391083660685a1714a7a42fd0be5eeb9490842d2cc54291644ed77aR12" _blank
	end
	class pwfr modified

	subgraph ymms ["views/Navbar.tsx"]

	end
	class ymms modified

	classDef modified stroke:black,fill:yellow
	classDef added stroke:black,fill:#b7e892,color:black
	classDef deleted stroke:black,fill:red
	fdci =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-8a6e2e029248d3f81978a62a94971630a69043a3240d11ff2ebbabfc72dd551eR39'>Line 39</a>" =====>tvry
	eurm =="<a target='_blank' href='https://github.com/vibinex/vibinex-server/pull/428/files#diff-51a577178391083660685a1714a7a42fd0be5eeb9490842d2cc54291644ed77aR41'>Line 41</a>" =====>tvry

	linkStyle 0,1 stroke:green,stroke-width:8


Loading

To modify DiffGraph settings, go to your Vibinex settings page.

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.

2 participants