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

[WEB-2445] fix: date picker and member picker dropdown z-index for list, kanban and spreadsheet views #5597

Merged
merged 7 commits into from
Sep 13, 2024

Conversation

sharma01ketan
Copy link
Collaborator

@sharma01ketan sharma01ketan commented Sep 12, 2024

[WEB-2445]

Notes:

The PR is raised again because the 'className' variable was being passed into two components, causing styling issues.
To overcome this, optionsClassName is passed in as a separate prop.

  • z-10 is chosen for list and gantt view: It was the value prior to the commit which introduced this bug.

  • z-9 for spreadsheet: because value of z-10 solved the issue for vertical scrolling only but not for horizontal scrolling, So the value had to be reduced further.

  • Day Picker refers to both start and end/due date here.

Changes:

List View:

  • Date picker does not overlap the header now.
Screenshot 2024-09-09 at 3 23 22 PM
  • Assignees Dropdown does not overlap the header now
Screenshot 2024-09-09 at 3 24 46 PM

Kanban View:

  • No overlapping with sidebar
Screenshot 2024-09-09 at 3 25 03 PM Screenshot 2024-09-09 at 3 25 35 PM

Spreadsheet View:

  • Same for Spreadsheet View.
Screenshot 2024-09-09 at 3 27 59 PM Screenshot 2024-09-09 at 3 28 33 PM

Previous State:

  • List View
Screenshot 2024-09-09 at 3 34 08 PM
  • Kanban View
Screenshot 2024-09-09 at 3 34 20 PM
  • Spreadsheet
Screenshot 2024-09-09 at 3 34 30 PM

Reference: [WEB-2445]

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Enhanced DateDropdown, MemberDropdown, and MemberOptions components to accept an optional optionsClassName prop for improved styling flexibility.
    • Updated various components to utilize optionsClassName for consistent styling management.
  • Bug Fixes

    • No specific bug fixes were included in this release.
  • Documentation

    • Updated component documentation to reflect the addition of the optionsClassName prop and its usage.

@sharma01ketan sharma01ketan added 🐛bug Something isn't working 🌐frontend labels Sep 12, 2024
@sharma01ketan sharma01ketan added this to the v0.23-dev milestone Sep 12, 2024
@sharma01ketan sharma01ketan self-assigned this Sep 12, 2024
Copy link
Contributor

coderabbitai bot commented Sep 12, 2024

Walkthrough

The changes introduce a new optional property, optionsClassName, to several dropdown components, including DateDropdown, MemberDropdown, and MemberOptions. This property allows users to specify custom class names for the options container, enhancing styling flexibility. The default value for optionsClassName is set to an empty string, and it replaces the previously used className in the rendering logic, improving customization capabilities without altering core functionality.

Changes

File Path Change Summary
web/core/components/dropdowns/date.tsx Added optionsClassName?: string; to Props in DateDropdown for custom styling of options.
web/core/components/dropdowns/member/index.tsx Added optionsClassName?: string; to Props in MemberDropdown for custom styling of options.
web/core/components/dropdowns/member/member-options.tsx Added optionsClassName?: string; to Props in MemberOptions for custom styling of options.
web/core/components/issues/issue-layouts/properties/all-properties.tsx Replaced className with optionsClassName for date pickers and assignee selector for consistent styling.
web/core/components/issues/issue-layouts/spreadsheet/columns/assignee-column.tsx Modified className from "z-9" to optionsClassName="z-[9]" for styling.
web/core/components/issues/issue-layouts/spreadsheet/columns/due-date-column.tsx Modified className from "z-9" to optionsClassName="z-[9]" for styling.
web/core/components/issues/issue-layouts/spreadsheet/columns/start-date-column.tsx Modified className from "z-9" to optionsClassName="z-[9]" for styling.

Possibly related PRs

Suggested labels

🌐web

Poem

🐰 In the meadow where dropdowns sway,
Options now have a class to play.
Custom styles, oh what a delight,
With optionsClassName, they shine so bright!
Hop along, let the colors bloom,
In our code garden, there's always room! 🌼


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b2533b9 and 1ebfb3c.

Files selected for processing (7)
  • web/core/components/dropdowns/date.tsx (3 hunks)
  • web/core/components/dropdowns/member/index.tsx (3 hunks)
  • web/core/components/dropdowns/member/member-options.tsx (2 hunks)
  • web/core/components/issues/issue-layouts/properties/all-properties.tsx (3 hunks)
  • web/core/components/issues/issue-layouts/spreadsheet/columns/assignee-column.tsx (1 hunks)
  • web/core/components/issues/issue-layouts/spreadsheet/columns/due-date-column.tsx (1 hunks)
  • web/core/components/issues/issue-layouts/spreadsheet/columns/start-date-column.tsx (1 hunks)
Files skipped from review due to trivial changes (4)
  • web/core/components/issues/issue-layouts/properties/all-properties.tsx
  • web/core/components/issues/issue-layouts/spreadsheet/columns/assignee-column.tsx
  • web/core/components/issues/issue-layouts/spreadsheet/columns/due-date-column.tsx
  • web/core/components/issues/issue-layouts/spreadsheet/columns/start-date-column.tsx
Additional comments not posted (8)
web/core/components/dropdowns/member/index.tsx (3)

25-25: LGTM!

The new optional property optionsClassName is correctly added to the Props type to enhance the component's styling flexibility. The type definition and optional nature of the property are accurate.


38-38: Looks good!

The optionsClassName prop is correctly destructured from props with a default value of an empty string. This change aligns with the PR objective and ensures that the prop is always defined, preventing potential errors.


167-167: Great work!

The optionsClassName prop is correctly passed to the MemberOptions component, replacing the previously used className prop. This change completes the implementation of the PR objective by utilizing the new prop for styling the dropdown options. The prop is passed correctly, and the change does not introduce any errors or inconsistencies.

web/core/components/dropdowns/member/member-options.tsx (3)

20-20: LGTM!

The new optional optionsClassName property in the Props interface is a good addition. It aligns with the PR objective, has the appropriate type, and provides flexibility by being optional.


28-28: Looks good!

The destructuring of props is correctly updated to include the new optionsClassName property, with a sensible default value of an empty string. This change aligns with the new property added to the Props interface.


99-99: Great work!

Utilizing the optionsClassName property for the options container's className is the right approach. It enhances the component's customization capabilities as intended in the PR objectives, without affecting the existing functionality.

web/core/components/dropdowns/date.tsx (2)

23-23: LGTM!

The addition of the optionsClassName property to the Props type enhances the component's customization capabilities by allowing users to specify custom class names for the options container. This change aligns with the PR objectives and does not introduce any issues.


43-43: LGTM!

Setting a default value of an empty string for the optionsClassName property ensures that the component behaves as expected even if the property is not provided. Utilizing optionsClassName in place of className for the options container improves the flexibility of styling the dropdown options without altering the core functionality. These changes align with the PR objectives and do not introduce any issues.

Also applies to: 169-169


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 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.

@sharma01ketan sharma01ketan changed the title [WEB-2282] fix: date picker and member picker dropdown z-index for list, kanban and spreadsheet views [WEB-2445] fix: date picker and member picker dropdown z-index for list, kanban and spreadsheet views Sep 12, 2024
@SatishGandham SatishGandham merged commit b44dd28 into preview Sep 13, 2024
13 of 15 checks passed
@SatishGandham SatishGandham deleted the fix/temp-date-assign-overlap branch September 13, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working 🌐frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants