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

Feat/search bar misalignment #3561

Closed
wants to merge 2 commits into from
Closed

Conversation

sv7000
Copy link
Contributor

@sv7000 sv7000 commented Jan 31, 2025

Issue No #3560

Description

This PR fixes the misalignment issue of the search bar on the Kanban page. The search bar was moving out of the viewport due to incorrect styling. Adjustments have been made to ensure proper positioning and responsiveness.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Previous screenshots

Before- Search Bar

Current screenshots

Screenshot 2025-01-31 at 7 39 56 PM

Please add here videos or images of the current (new) status

Summary by CodeRabbit

  • Style

    • Updated Kanban page layout and spacing
    • Refined main page container styling
    • Reduced width of collapsed Kanban search bar
  • Chores

    • Minor visual refinements across multiple components

Copy link
Contributor

coderabbitai bot commented Jan 31, 2025

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/app/[locale]/kanban/page.tsx

Oops! Something went wrong! :(

ESLint: 8.46.0

ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct.

The config "next/core-web-vitals" was referenced from the config file in "/apps/web/.eslintrc.json".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

apps/web/app/[locale]/page-component.tsx

Oops! Something went wrong! :(

ESLint: 8.46.0

ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct.

The config "next/core-web-vitals" was referenced from the config file in "/apps/web/.eslintrc.json".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

apps/web/components/pages/kanban/search-bar.tsx

Oops! Something went wrong! :(

ESLint: 8.46.0

ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct.

The config "next/core-web-vitals" was referenced from the config file in "/apps/web/.eslintrc.json".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

Walkthrough

The pull request involves minor layout and styling modifications across three files in the web application. Changes primarily focus on adjusting flex properties, padding, and container classes in the Kanban page, main page component, and search bar. These updates aim to refine the visual presentation and spacing of UI elements without altering core functionality or logic.

Changes

File Change Summary
apps/web/app/[locale]/kanban/page.tsx - Modified main container flex properties from flex flex-col-reverse to flex flex-col
- Reduced bottom padding of tab elements from pb-[30px] to pb-[20px]
- Updated top padding for dropdown components from pt-[3px] to pt-1
apps/web/app/[locale]/page-component.tsx - Changed container class from mx-8-container to container
- Removed extra space in style class definition
apps/web/components/pages/kanban/search-bar.tsx - Reduced input field width in collapsed state from w-44 to w-24

Possibly related PRs

Suggested labels

WEB, Bug fix, UI/UX, Improvement

Suggested reviewers

  • evereq

Poem

🐰 A rabbit's tale of UI delight,
Pixels dancing, spacing just right
Flex and padding, a subtle art
Kanban's layout gets a fresh start
Code refined with gentle care! 🎨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

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: 1

🧹 Nitpick comments (1)
apps/web/components/pages/kanban/search-bar.tsx (1)

43-43: LGTM! Consider adding a min-width for better UX.

The width reduction in collapsed state helps prevent viewport overflow. The transition-all class ensures smooth animation between states.

Consider adding a min-width to prevent the search bar from becoming too small on very narrow screens:

-				className={`mb-0 h-10 transition-all ${isExpanded ? 'w-64' : 'w-24'} !bg-transparent`}
+				className={`mb-0 h-10 transition-all min-w-[5rem] ${isExpanded ? 'w-64' : 'w-24'} !bg-transparent`}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5650129 and 8fc758a.

📒 Files selected for processing (3)
  • apps/web/app/[locale]/kanban/page.tsx (3 hunks)
  • apps/web/app/[locale]/page-component.tsx (2 hunks)
  • apps/web/components/pages/kanban/search-bar.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: deploy
🔇 Additional comments (4)
apps/web/app/[locale]/page-component.tsx (1)

66-66: LGTM! Code cleanup.

Removed extra space in clsxm class string for better code cleanliness.

apps/web/app/[locale]/kanban/page.tsx (3)

159-160: LGTM! Improved flex layout.

The changes from flex-col-reverse to flex-col with centered justification help maintain proper vertical alignment of the search bar and other elements.


165-165: LGTM! Consistent spacing.

Reduced bottom padding from 30px to 20px creates more balanced spacing between elements.


182-182: LGTM! Standardized padding.

Changed padding-top from pt-[3px] to pt-1 for consistent spacing across dropdown components.

Also applies to: 232-232, 239-239, 246-246

@@ -76,7 +76,7 @@ function MainPage() {
</div>
</div>

<div className="mx-8-container">
<div className="container">
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Container class change will affect layout behavior

The change from mx-8-container to container removes dynamic width behavior and introduces fixed constraints:

  • Loses responsive full-width capability controlled by application state
  • Applies fixed 2rem padding and max-width limits
  • May cause unexpected layout shifts
🔗 Analysis chain

Verify container width impact.

The change from mx-8-container to container class could affect the layout width. Please ensure this doesn't cause any unintended side effects on other components.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other usages of mx-8-container to ensure we're not breaking existing layouts
rg -l "mx-8-container" --type css --type tsx

Length of output: 72


Script:

#!/bin/bash
# Search for both class names and tailwind config
echo "=== Searching for mx-8-container ==="
rg "mx-8-container"

echo -e "\n=== Searching for tailwind.config ==="
fd "tailwind.config"

echo -e "\n=== Checking container styles in CSS files ==="
rg "container" --type css

echo -e "\n=== Checking for container class in TSX/JSX files ==="
find . -type f \( -name "*.tsx" -o -name "*.jsx" \) -exec grep -l "container" {} \;

Length of output: 10528


Script:

#!/bin/bash
# Check the container class definitions
echo "=== AppContainer.tsx content ==="
cat apps/web/lib/layout/AppContainer.tsx

echo -e "\n=== Tailwind container configuration ==="
cat apps/web/tailwind.config.js

Length of output: 6276

Copy link
Contributor

@Innocent-Akim Innocent-Akim left a comment

Choose a reason for hiding this comment

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

Please try to check the display using Cards, Table, and Blocks. There is a component that is not displaying correctly from this PR.
Here is the image:

Before
Screenshot 2025-02-01 at 8 49 55 AM

After

bug-screeen

@sv7000 sv7000 closed this Feb 1, 2025
@evereq evereq deleted the feat/search-bar-misalignment branch February 7, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants