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

🐛 Fixed dropdowns in Members filters #22082

Merged
merged 9 commits into from
Jan 30, 2025
Merged

Conversation

dvdwinden
Copy link
Contributor

The (empty) wormhole div was being inserted into the DOM, which was causing the position of the Filter button to shift. This change makes sure the div is positioned above all else, so it doesn't interfere with the layout.
These changes solve some strange positioning and rendering issues we were seeing in the dropdown.
The previously set min-height (for labels in a dropdown) was causing issues elsewhere and, upon closer inspection, did not seem necessary.
The previous solution was pixel-based, and caused issues across different implementations of the dropdown. This approach should vertically centre the icon more consistently.
More specific targeting to make sure the positioning of the arrow is always relative to the first line of the dropdown.
In light and dark mode.
@dvdwinden dvdwinden force-pushed the members-filter-issues-fix branch from 755a6ac to e1632c6 Compare January 30, 2025 15:44
Copy link
Contributor

coderabbitai bot commented Jan 30, 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.

ghost/admin/app/styles/components/power-select.css

Oops! Something went wrong! :(

ESLint: 8.44.0

Error: Failed to load parser '@babel/eslint-parser' declared in 'ghost/admin/.eslintrc.js': Cannot find module '@babel/eslint-parser'
Require stack:

  • /ghost/admin/.eslintrc.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
ghost/admin/app/styles/layouts/members.css

Oops! Something went wrong! :(

ESLint: 8.44.0

Error: Failed to load parser '@babel/eslint-parser' declared in 'ghost/admin/.eslintrc.js': Cannot find module '@babel/eslint-parser'
Require stack:

  • /ghost/admin/.eslintrc.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
ghost/admin/app/styles/app-dark.css

Oops! Something went wrong! :(

ESLint: 8.44.0

Error: Failed to load parser '@babel/eslint-parser' declared in 'ghost/admin/.eslintrc.js': Cannot find module '@babel/eslint-parser'
Require stack:

  • /ghost/admin/.eslintrc.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)

Walkthrough

This pull request focuses on enhancing the styling of the Ember Power Select component across multiple CSS files. The changes include adjusting background colors, border properties, and layout configurations for various selector classes. The modifications aim to improve the visual consistency and responsiveness of the component, particularly in dark mode and multiple selection scenarios.

Changes

File Change Summary
ghost/admin/app/styles/app-dark.css Added CSS rule for .ember-power-select-trigger:not(.gh-input-x) with background and border color set to var(--lightgrey)
ghost/admin/app/styles/components/power-select.css - Updated background of .ember-power-select-trigger:not(.gh-input-x) to var(--main-bg-color)
- Added new classes with flexbox and layout properties for various Power Select trigger states
- Adjusted border-radius to use var(--border-radius)
ghost/admin/app/styles/layouts/members.css Changed .gh-member-actions-menu right positioning from 10px to 0
ghost/admin/app/styles/patterns/forms.css Removed min-height: 38px; from .ember-power-select-multiple-trigger

Sequence Diagram

sequenceDiagram
    participant UI as User Interface
    participant PS as Power Select Component
    participant CSS as Styling Rules

    UI->>PS: Trigger Selection
    PS->>CSS: Apply Styling
    CSS-->>PS: Update Background
    CSS-->>PS: Adjust Layout
    PS->>UI: Render Component
Loading

Possibly related PRs

Suggested Labels

browser-tests


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 523b9d4 and e1632c6.

📒 Files selected for processing (4)
  • ghost/admin/app/styles/app-dark.css (1 hunks)
  • ghost/admin/app/styles/components/power-select.css (4 hunks)
  • ghost/admin/app/styles/layouts/members.css (1 hunks)
  • ghost/admin/app/styles/patterns/forms.css (0 hunks)
💤 Files with no reviewable changes (1)
  • ghost/admin/app/styles/patterns/forms.css
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Lint
  • GitHub Check: Admin tests - Chrome
🔇 Additional comments (6)
ghost/admin/app/styles/components/power-select.css (4)

5-5: Background color fix looks good!

Using var(--main-bg-color) instead of transparent ensures consistent background color across themes.


248-248: Border radius consistency improvement!

Using var(--border-radius) ensures the dropdown border radius matches the global theme setting.


311-316: Layout improvements look good!

The new styles ensure proper positioning and alignment of the dropdown trigger.


540-562: Multiple select styling improvements look good!

The new styles provide better layout and spacing for multiple select dropdowns.

ghost/admin/app/styles/app-dark.css (1)

1105-1108: Dark mode styling fix looks good!

The added styles ensure proper background and border colors in dark mode.

ghost/admin/app/styles/layouts/members.css (1)

185-185: Menu alignment improvement!

Changing right: 0 aligns the menu flush with its container's right edge.


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.

@dvdwinden dvdwinden merged commit 9e439ad into main Jan 30, 2025
19 checks passed
@dvdwinden dvdwinden deleted the members-filter-issues-fix branch January 30, 2025 15:52
@dvdwinden dvdwinden changed the title 🐛 Fixes dropdowns in Members filters 🐛 Fixed dropdowns in Members filters Jan 30, 2025
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