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: metrics ui component #2745

Merged
merged 10 commits into from
Dec 13, 2024
Merged

Conversation

Flo4604
Copy link
Contributor

@Flo4604 Flo4604 commented Dec 12, 2024

What does this PR do?

Fixes the white metric seperator things
CleanShot 2024-12-12 at 18 19 56@2x

Also changes require to import because the build doesn't work locally for me otherwise.

Fixes #2747

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

Check if any place with a metric component is white in darkmode

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • New Features

    • Introduced a new Metric component for enhanced display of various metrics across the dashboard.
    • Updated multiple pages to utilize the new Metric component for presenting API key metrics, API usage statistics, rate limit information, and more.
  • Bug Fixes

    • Improved visual styling of alerts and dialog components by adding border styles.
  • Refactor

    • Removed local definitions of the Metric component in favor of a centralized version, streamlining code and enhancing maintainability.
  • Style

    • Enhanced styling for various components by adding border classes to improve visual consistency.

Copy link

changeset-bot bot commented Dec 12, 2024

⚠️ No Changeset found

Latest commit: 50bb31f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 12, 2024

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

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 11:20am
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 11:20am
play ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 11:20am
www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 11:20am

Copy link
Contributor

coderabbitai bot commented Dec 12, 2024

📝 Walkthrough

Walkthrough

The pull request introduces a new Metric component across various files in the dashboard application, replacing local definitions of the component with a centralized version from the UI library. The updates enhance the display of metrics related to API keys, rate limits, and other elements while maintaining existing logic and control flows. Additionally, minor styling adjustments have been made to various components, primarily adding a border-border class for improved visual presentation.

Changes

File Path Change Summary
apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/page.tsx Added import for Metric, utilized in rendering API key metrics, removed local Metric definition.
apps/dashboard/app/(app)/apis/[apiId]/page.tsx Added import for Metric, used to display API usage metrics, removed local Metric definition.
apps/dashboard/app/(app)/ratelimits/[namespaceId]/page.tsx Added import for Metric, used for displaying rate limit metrics, removed local Metric definition.
apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx Added import for Metric, removed local Metric definition, minor adjustments to LastUsed component.
apps/dashboard/app/ratelimit/page.tsx Added import for Metric, used to display rate limit test results, removed local Metric definition.
apps/dashboard/components/ui/metric.tsx New Metric component created with defined props.
apps/dashboard/app/(app)/apis/[apiId]/settings/update-ip-whitelist.tsx Added border-border class to Alert component for styling.
apps/dashboard/app/(app)/apis/create-api-button.tsx Added border-border class to DialogContent for styling.
apps/dashboard/app/(app)/authorization/permissions/[permissionId]/page.tsx Added border-border class to Metric component's outer div for styling.
apps/dashboard/app/(app)/authorization/permissions/create-new-permission.tsx Added border-border class to DialogContent for styling.
apps/dashboard/app/(app)/authorization/roles/create-new-role.tsx Added border-border class to DialogContent for styling.
apps/dashboard/app/(app)/ratelimits/create-namespace-button.tsx Added border-border class to DialogContent for styling.
apps/dashboard/app/(app)/settings/user/update-theme.tsx Updated button class to include border-border for styling.

Assessment against linked issues

Objective Addressed Explanation
Ensure no white borders in dark mode (Issue #2747)
Maintain consistent metric display across components

Possibly related PRs

Suggested labels

Feature, Improvement, Bug, Needs Approval

Suggested reviewers

  • mcstepp
  • chronark
  • perkinsjr
  • ogzhanolguncu

📜 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 25a55e3 and 03ed7ec.

📒 Files selected for processing (11)
  • apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/page.tsx (3 hunks)
  • apps/dashboard/app/(app)/apis/[apiId]/page.tsx (1 hunks)
  • apps/dashboard/app/(app)/apis/[apiId]/settings/update-ip-whitelist.tsx (1 hunks)
  • apps/dashboard/app/(app)/apis/create-api-button.tsx (1 hunks)
  • apps/dashboard/app/(app)/authorization/permissions/[permissionId]/page.tsx (1 hunks)
  • apps/dashboard/app/(app)/authorization/permissions/create-new-permission.tsx (1 hunks)
  • apps/dashboard/app/(app)/authorization/roles/create-new-role.tsx (1 hunks)
  • apps/dashboard/app/(app)/ratelimits/create-namespace-button.tsx (1 hunks)
  • apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx (1 hunks)
  • apps/dashboard/app/(app)/settings/user/update-theme.tsx (1 hunks)
  • apps/dashboard/components/ui/metric.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (6)
  • apps/dashboard/app/(app)/authorization/permissions/create-new-permission.tsx
  • apps/dashboard/app/(app)/authorization/roles/create-new-role.tsx
  • apps/dashboard/app/(app)/ratelimits/create-namespace-button.tsx
  • apps/dashboard/app/(app)/settings/user/update-theme.tsx
  • apps/dashboard/app/(app)/authorization/permissions/[permissionId]/page.tsx
  • apps/dashboard/app/(app)/apis/create-api-button.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/dashboard/components/ui/metric.tsx
  • apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx
  • apps/dashboard/app/(app)/apis/[apiId]/page.tsx
  • apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/page.tsx
🔇 Additional comments (1)
apps/dashboard/app/(app)/apis/[apiId]/settings/update-ip-whitelist.tsx (1)

Line range hint 101-112: LGTM! The border styling enhancement aligns with the PR objectives.

The addition of the border-border class to the Alert component should properly address the visual issue with white separators in dark mode.

Let's verify the visual appearance in dark mode by checking for any other instances of Alert components that might need similar treatment:

✅ Verification successful

The border styling enhancement is consistent with similar Alert components in the codebase

Looking at the search results, most Alert components in the codebase either use variant-based styling (variant="alert") or have minimal className props. The addition of border-border class in this specific Alert component is appropriate as it's a unique case where the Alert is used as a feature upgrade prompt with specific layout requirements (flex, justify-between).

  • The styling change is isolated to this specific use case and doesn't require similar changes in other Alert components
  • Other Alert components are properly styled through variants or default styles
  • The change aligns with the PR's dark mode enhancement objectives
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find other Alert components that might need the border-border class
# Look for Alert components without the border-border class

# Search for Alert components
rg -U "Alert.*className(?!.*border-border)" --type tsx

Length of output: 311


Script:

#!/bin/bash
# Let's try a simpler approach to find Alert components
# First, find all Alert components with className
rg -U "<Alert.*className" --type tsx

# Also search for general Alert usage to compare
rg -U "<Alert\b" --type tsx

Length of output: 124


Script:

#!/bin/bash
# Search for Alert components without specifying file type
# First, find all Alert components with className
rg -U "<Alert.*className"

# Also search for general Alert usage to compare
rg -U "<Alert\b"

Length of output: 2411


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. (Experiment)
  • @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

vercel bot commented Dec 12, 2024

@Flo4604 is attempting to deploy a commit to the Unkey Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Thank you for following the naming conventions for pull request titles! 🙏

@Flo4604
Copy link
Contributor Author

Flo4604 commented Dec 12, 2024

auth page still has another metric component

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

🧹 Outside diff range and nitpick comments (4)
apps/dashboard/components/ui/metric.tsx (1)

8-15: Consider enhancing accessibility with ARIA attributes

The component structure looks good, but could benefit from additional accessibility attributes.

 const Metric = React.forwardRef<HTMLDivElement, MetricProps>(({ label, value }) => {
   return (
-    <div className="flex flex-col items-start justify-center px-4 py-2 border-border">
+    <div className="flex flex-col items-start justify-center px-4 py-2 border-border" role="group" aria-labelledby={`metric-${label.toLowerCase().replace(/\s+/g, '-')}`}>
-      <p className="text-sm text-content-subtle">{label}</p>
+      <p id={`metric-${label.toLowerCase().replace(/\s+/g, '-')}`} className="text-sm text-content-subtle">{label}</p>
       <div className="text-2xl font-semibold leading-none tracking-tight">{value}</div>
     </div>
   );
 });
+
+Metric.displayName = "Metric";
apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx (1)

Dark mode separator styling needs to be added

The code uses divide-x class for separating metrics in the CardContent, but lacks dark mode styling. This should be addressed to ensure proper visibility in dark mode, similar to how it's implemented in the billing page where dark:divide-gray-800 is used.

  • In apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx, line 47: Add dark mode class to <CardContent className="flex flex-wrap justify-between divide-x [&>div:first-child]:pl-0"> to include dark:divide-gray-800
🔗 Analysis chain

Line range hint 41-47: Verify dark mode styling for metric separators

The divide-x class is used here which might be related to the white separator issue mentioned in the PR objectives.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any explicit color definitions for divide classes in dark mode
rg -l "divide-" apps/dashboard/styles
rg "divide-.*dark:" apps/dashboard/styles

Length of output: 81


Script:

#!/bin/bash
# Let's check the actual file content to understand the context and styling
cat "apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx"

# Also check for any global dark mode configurations in the project
rg -g "*.{css,ts,tsx}" "dark:divide-" .

Length of output: 2799

apps/dashboard/tailwind.config.js (1)

Line range hint 134-148: Consider modernizing the merge function

The merge function could be improved using modern JavaScript features.

 export function merge(obj1, obj2) {
-  for (const key in obj2) {
-    // biome-ignore lint/suspicious/noPrototypeBuiltins: don't tell me what to do
-    if (obj2.hasOwnProperty(key)) {
-      if (typeof obj2[key] === "object" && !Array.isArray(obj2[key])) {
-        if (!obj1[key]) {
-          obj1[key] = {};
-        }
-        obj1[key] = merge(obj1[key], obj2[key]);
-      } else {
-        obj1[key] = obj2[key];
-      }
+  return Object.entries(obj2).reduce((acc, [key, value]) => {
+    if (typeof value === "object" && !Array.isArray(value)) {
+      acc[key] = merge(acc[key] || {}, value);
+    } else {
+      acc[key] = value;
     }
-  }
-  return obj1;
+    return acc;
+  }, { ...obj1 });
 }
apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/page.tsx (1)

Line range hint 315-315: Critical: Incorrect metric value for Disabled status

The Disabled metric is incorrectly displaying the value of successful validations (stats.valid) instead of disabled validations (stats.disabled).

Apply this fix:

-<Metric label="Disabled" value={formatNumber(stats.valid)} />
+<Metric label="Disabled" value={formatNumber(stats.disabled)} />
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cc1c90c and 25a55e3.

📒 Files selected for processing (7)
  • apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/page.tsx (2 hunks)
  • apps/dashboard/app/(app)/apis/[apiId]/page.tsx (2 hunks)
  • apps/dashboard/app/(app)/ratelimits/[namespaceId]/page.tsx (1 hunks)
  • apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx (2 hunks)
  • apps/dashboard/app/ratelimit/page.tsx (1 hunks)
  • apps/dashboard/components/ui/metric.tsx (1 hunks)
  • apps/dashboard/tailwind.config.js (1 hunks)
🔇 Additional comments (11)
apps/dashboard/components/ui/metric.tsx (1)

3-6: LGTM! Clean and well-typed interface.

The MetricProps interface is well-defined and appropriately typed for the component's needs.

apps/dashboard/app/(app)/settings/root-keys/[keyId]/layout.tsx (1)

69-73: LGTM! Clean type declaration for LastUsed component

The type declaration is well-structured and properly typed.

apps/dashboard/app/(app)/apis/[apiId]/page.tsx (2)

121-124: LGTM: Improved code formatting

The reformatting of the insufficientPermissionsOverTime mapping improves readability while maintaining the same functionality.


4-4: Verify Metric component styling in dark mode

Since this PR aims to fix metric separators in dark mode, let's verify the styling.

✅ Verification successful

Based on the examination of the codebase, I can now provide a final response:

Dark mode styling is properly handled through Tailwind classes

The Metric component uses Tailwind's built-in dark mode system through utility classes:

  • The border color uses border-border which is a theme token that automatically adapts to dark mode
  • The text color uses text-content-subtle for the label and default text styling for the value, both of which are theme tokens that handle dark mode transitions
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for dark mode specific styles in the Metric component
rg -A 5 "dark:" apps/dashboard/components/ui/metric.tsx

Length of output: 55


Script:

#!/bin/bash
# First, let's check if the file exists and see its content
fd "metric.tsx" apps/dashboard/components/ui

# If not found in the expected location, let's search in other directories
fd "metric.tsx"

# Let's also check for any Metric component with dark mode styling
rg -i "dark.*metric" --type tsx

Length of output: 202


Script:

#!/bin/bash
# Let's examine the content of the Metric component
cat apps/dashboard/components/ui/metric.tsx

# Also search for dark mode related styles without file type restriction
rg -i "dark.*metric"

Length of output: 552


Script:

#!/bin/bash
# Let's check the tailwind config for dark mode border and text color definitions
rg "border-border|text-content-subtle" -A 5

# Also check for any recent changes to the Metric component
git diff HEAD~1 apps/dashboard/components/ui/metric.tsx

Length of output: 67239

apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/page.tsx (3)

12-12: LGTM: Clean import of Metric component

The import statement follows Next.js conventions and properly organizes UI components.


99-103: LGTM: Improved query readability

The clickhouse query formatting enhances code readability while maintaining the same functionality.


Line range hint 241-251: Verify dark mode styling for metric separators

The PR aims to fix white metric separators in dark mode. Please verify that the divide-x utility classes in both grid layouts properly handle dark mode colors.

Let's check the component's styling implementation:

Also applies to: 308-320

✅ Verification successful

Let me gather more specific information about the dark mode styling configuration and the divider utilities.


Based on the gathered information, I can now generate the final response:

The divide-x utility is properly handled for dark mode

The dark mode styling is correctly configured in the Tailwind CSS setup. The --border color variable is properly defined for both light mode (24, 6%, 83%) and dark mode (12, 6%, 15%), and all divider utilities (divide-x) inherit this color through the base layer configuration: * { @apply border-border; }. This ensures consistent styling of separators in both light and dark modes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for dark mode styling in the Metric component and related CSS

# Look for dark mode specific styles
rg -l "dark:" apps/dashboard/

# Check the Metric component implementation
cat apps/dashboard/components/ui/metric.tsx

# Look for any global dark mode styling configurations
fd -e css -e scss . apps/dashboard/

Length of output: 1706


Script:

#!/bin/bash
# Check tailwind configuration and global styles
cat apps/dashboard/styles/tailwind/tailwind.css

# Look for divider-related styles and their dark mode variants
rg "divide-" apps/dashboard/

# Check the specific file mentioned in the review for the metric usage context
cat "apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/[keyId]/page.tsx"

Length of output: 19057

apps/dashboard/app/ratelimit/page.tsx (2)

11-11: LGTM: Import statement change aligns with PR objectives

The change from require to import statement is consistent with the PR objectives.


Line range hint 164-167: Verify dark mode appearance of metric separators

The divide-x class is used for metric separation in multiple cards. Since the PR objectives mention fixing white separators in dark mode, please verify that these separators now appear correctly in dark mode.

Run the following script to check for any remaining instances of potentially problematic separator styling:

Also applies to: 199-202, 234-237

✅ Verification successful

Dark mode divider styling has been properly implemented

Based on the search results, the codebase shows proper dark mode handling for dividers:

  1. The billing page explicitly sets dark mode styles with dark:divide-gray-800 class
  2. The Metric component uses border-border class which inherits from the theme system
  3. The global CSS shows proper dark mode theming with --border CSS variable set in the root theme

The separators will appear correctly in dark mode as they use the theme-aware border colors through Tailwind's configuration.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for divide-x usage and related dark mode styles
# Look for divide-x classes and related dark mode styling
rg -A 3 'divide-x' 

# Check for any custom separator styling in CSS/SCSS files
fd -e css -e scss -x rg -A 3 'divide|separator'

Length of output: 5461


Script:

#!/bin/bash
# Let's check for dark mode specific styling for dividers
rg -A 3 'dark:divide'

# Check the Metric component implementation for any dark mode specific styles
fd -g '*metric*.tsx' -x cat {}

# Check for any global dark mode styles that might affect dividers
fd -g 'globals.css' -x cat {}

Length of output: 15209

apps/dashboard/app/(app)/ratelimits/[namespaceId]/page.tsx (2)

6-6: LGTM: Import statement change aligns with PR objectives

The change from require to import statement is consistent with the PR objectives.


Line range hint 155-167: Verify dark mode appearance of responsive separators

The code uses responsive separator classes:

  • divide-y md:divide-y-0 md:divide-x in the main metrics card
  • divide-x in the request metrics header

Please verify that these separators appear correctly in dark mode across different screen sizes.

Run the following script to check for any remaining responsive separator styling issues:

Also applies to: 191-204

✅ Verification successful

Separators are properly styled for dark mode

The verification shows that separators are correctly styled for dark mode:

  1. The Separator component in the dashboard uses bg-border class which automatically handles dark mode through the theme system.
  2. The responsive dividers mentioned in the review (divide-y md:divide-y-0 md:divide-x) are properly styled with dark mode variants as seen in the billing page example (dark:divide-gray-800).

The implementation ensures consistent appearance across different screen sizes and color schemes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for responsive separator styling
# Look for responsive divide classes
rg 'divide-[xy].*md:divide'

# Check for any media query related separator styling
fd -e css -e scss -x rg -A 3 '@media.*divide'

Length of output: 237


Script:

#!/bin/bash
# Let's check for dark mode styling configurations for separators and dividers
rg -A 3 'dark:.*divide|divide.*dark:'

# Check the global styles or theme configuration for separator styling
fd -e css -e scss -x cat {} \;

# Look for Separator component usage and its styling
rg -A 2 '<Separator'

Length of output: 34242


Script:

#!/bin/bash
# Let's check for dark mode specific styling in the theme configuration and tailwind config
rg -A 5 'dark:divide|dark.*divide' apps/dashboard

# Check for any separator-specific styling in the theme configuration
fd -e js -e ts -x rg -l 'separator' {} \; | grep -i 'theme\|tailwind'

# Look for the Separator component definition to understand its styling
ast-grep --pattern 'const Separator = $$$'

Length of output: 3208

apps/dashboard/tailwind.config.js Outdated Show resolved Hide resolved
@ogzhanolguncu
Copy link
Contributor

Could you please run the formatter?
Ran pnpm fmt you checked this, but code isn't formatted properly.

@Flo4604
Copy link
Contributor Author

Flo4604 commented Dec 12, 2024

Could you please run the formatter? Ran pnpm fmt you checked this, but code isn't formatted properly.

CleanShot 2024-12-12 at 19 01 18@2x
I did, shows no changes for me.

I fixed the stuff manually and it didn't reformat it idk

@ogzhanolguncu
Copy link
Contributor

Could you please run the formatter? Ran pnpm fmt you checked this, but code isn't formatted properly.

CleanShot 2024-12-12 at 19 01 18@2x I did, shows no changes for me.

I fixed the stuff manually and it didn't reformat it idk

image

Might be my bad that one caught me off guard. Also can you open an issue for this one?

@Flo4604
Copy link
Contributor Author

Flo4604 commented Dec 12, 2024

Could you please run the formatter? Ran pnpm fmt you checked this, but code isn't formatted properly.

CleanShot 2024-12-12 at 19 01 18@2x I did, shows no changes for me.
I fixed the stuff manually and it didn't reformat it idk

image

Might be my bad that one caught me off guard. Also can you open an issue for this one?

actually It zed that formatted it like this but biome doesn't seem to care, I manually changed it back and it didn't reformat it so I'm not sure whats up with that.

Created an issue and linked it sorry about that

@Flo4604 Flo4604 marked this pull request as ready for review December 12, 2024 18:29
@Flo4604
Copy link
Contributor Author

Flo4604 commented Dec 12, 2024

should be most if not all places

@ogzhanolguncu
Copy link
Contributor

Wow that's a lot of Metric components 😄. Great work.

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.

Dark mode has some irregularities with white borders
2 participants