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

Add extensions dark mode styles #2045

Merged
merged 8 commits into from
Jul 30, 2024
Merged

Add extensions dark mode styles #2045

merged 8 commits into from
Jul 30, 2024

Conversation

rohitpaulk
Copy link
Member

@rohitpaulk rohitpaulk commented Jul 30, 2024

  • Add dark mode toggle tests
  • Refactor import order in dark-mode-test.js for better readability
  • leaderboard updates
  • update v2
  • extensions enabling after completion

Summary by CodeRabbit

  • New Features

    • Enhanced dark mode support across multiple UI components, improving visual consistency and accessibility.
    • Introduced a new route and controller for managing course stage completions, facilitating better data handling.
  • Bug Fixes

    • Improved text contrast and readability for various components in both light and dark themes.
  • Style

    • Updated text and border colors for UI elements to enhance visual clarity and alignment with theme settings.
    • Enhanced styling for GitHub app installation prompts to improve visibility in dark mode.

Copy link
Contributor

coderabbitai bot commented Jul 30, 2024

Walkthrough

The recent changes significantly enhance the visual styling and usability of various application components, with a strong focus on improving dark mode support. Key updates involve refining text and border colors for better contrast and readability, alongside the introduction of TypeScript files for controllers and routes to enhance type safety. Collectively, these modifications foster a more cohesive user experience while preserving existing functionalities.

Changes

Files Change Summary
app/components/comment-form/tab-header.hbs Updated text color for dark theme to improve readability.
app/components/course-card.hbs Enhanced text colors for course description and stages for better contrast.
app/components/course-page/base-stages-completed-card.hbs Introduced dark mode support with adjusted border and text colors for improved usability.
app/components/course-page/configure-extensions-modal.hbs Updated text and border colors for better visual consistency in light and dark modes.
app/components/course-page/configure-github-integration-modal.hbs Adjusted text colors for improved visibility in light and dark modes.
app/components/course-page/course-completed-card.hbs Enhanced text colors and borders for dark mode support, improving accessibility.
app/components/course-page/step-list-item.hbs Adjusted text colors based on active/inactive states to enhance readability.
app/components/tracks-page/track-card.hbs Updated SVG icon and text colors for stages count to improve visibility.
app/controllers/course/base-stages-completed.ts Introduced a controller with typed model for managing course stages completion.
app/routes/course/base-stages-completed.ts Defined a new route with type consistency for course data handling.
app/templates/course/base-stages-completed.hbs Removed a comment regarding model typing, indicating a resolution of previous concerns.
app/components/course-page/configure-github-integration-modal/fix-github-app-installation-prompt.hbs Enhanced styling for GitHub app installation prompt, improving visibility in dark mode.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CoursePage
    participant BaseStagesCompletedController
    participant BaseStagesCompletedRoute

    User->>CoursePage: Request to view course stages
    CoursePage->>BaseStagesCompletedRoute: Navigate to stages completion
    BaseStagesCompletedRoute->>BaseStagesCompletedController: Load model data
    BaseStagesCompletedController-->>CoursePage: Return model data
    CoursePage->>User: Display stages completion page
Loading

🐰 In the code, colors bright and bold,
🐇 Texts and borders, a sight to behold!
🌙 Dark mode's charm, a cozy embrace,
🌟 Readability shines in every space.
🎉 With every hop, our UI's a delight,
🥳 A joyful update, oh what a sight!


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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

@rohitpaulk rohitpaulk changed the title add dark mode upgrade flow Add extensions dark mode styles Jul 30, 2024
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3b3585c and 95cb573.

Files selected for processing (11)
  • app/components/comment-form/tab-header.hbs (1 hunks)
  • app/components/course-card.hbs (2 hunks)
  • app/components/course-page/base-stages-completed-card.hbs (1 hunks)
  • app/components/course-page/configure-extensions-modal.hbs (2 hunks)
  • app/components/course-page/configure-extensions-modal/extension-card.hbs (1 hunks)
  • app/components/course-page/step-list-item.hbs (1 hunks)
  • app/components/tracks-page/track-card.hbs (1 hunks)
  • app/components/vote-page/submit-course-extension-idea-card.hbs (1 hunks)
  • app/controllers/course/base-stages-completed.ts (1 hunks)
  • app/routes/course/base-stages-completed.ts (1 hunks)
  • app/templates/course/base-stages-completed.hbs (1 hunks)
Files skipped from review due to trivial changes (6)
  • app/components/comment-form/tab-header.hbs
  • app/components/course-card.hbs
  • app/components/course-page/configure-extensions-modal.hbs
  • app/components/course-page/step-list-item.hbs
  • app/components/tracks-page/track-card.hbs
  • app/templates/course/base-stages-completed.hbs
Additional comments not posted (10)
app/controllers/course/base-stages-completed.ts (2)

1-2: Imports look good.

The import statements are necessary and correctly imported.


4-6: Class declaration looks good.

The class BaseStagesCompletedController is well-defined and follows TypeScript conventions.

app/routes/course/base-stages-completed.ts (2)

1-2: Imports look good.

The import statements are necessary and correctly imported.


4-6: Class declaration looks good.

The class BaseStagesCompletedRoute is well-defined and follows TypeScript conventions.

app/components/vote-page/submit-course-extension-idea-card.hbs (1)

2-2: Dark mode styling looks good.

The updated class attributes enhance the styling for dark mode, improving visual accessibility and user experience.

app/components/course-page/configure-extensions-modal/extension-card.hbs (2)

2-3: LGTM! The dark mode support is well-implemented.

The conditional classes for dark mode styling are correctly applied to the outer <div>.


11-11: LGTM! The dark mode support is well-implemented.

The conditional classes for dark mode styling are correctly applied to the inner <div>.

app/components/course-page/base-stages-completed-card.hbs (3)

3-3: LGTM! The dark mode support is well-implemented.

The conditional class for dark mode border styling is correctly applied to the header <div>.


5-5: LGTM! The dark mode support is well-implemented.

The conditional class for dark mode text styling is correctly applied to the header title <span>.


10-10: LGTM! The dark mode support is well-implemented.

The conditional class for dark mode styling is correctly applied to the content <div>.

Copy link

github-actions bot commented Jul 30, 2024

Test Results

  1 files  ±0    1 suites  ±0   5m 52s ⏱️ -8s
553 tests ±0  518 ✅ ±0  35 💤 ±0  0 ❌ ±0 
568 runs  ±0  533 ✅ ±0  35 💤 ±0  0 ❌ ±0 

Results for commit ef2ca3b. ± Comparison against base commit 3b3585c.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jul 30, 2024

Bundle Report

Changes will decrease total bundle size by 213 bytes ⬇️

Bundle name Size Change
client-array-push 35.13MB 213 bytes ⬇️

The commit message could be: "Refactor extension-card.hbs: fix formatting issue"
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 95cb573 and 3d488b3.

Files selected for processing (2)
  • app/components/course-page/configure-extensions-modal/extension-card.hbs (1 hunks)
  • app/components/course-page/course-completed-card.hbs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/components/course-page/configure-extensions-modal/extension-card.hbs
Additional comments not posted (3)
app/components/course-page/course-completed-card.hbs (3)

3-3: LGTM! Dark mode border color update.

The addition of dark:border-gray-800/60 improves the border color for dark mode.


5-5: LGTM! Dark mode text color update.

The addition of dark:text-gray-50 improves the text color for dark mode.


9-9: LGTM! Dark mode prose styling update.

The addition of dark:prose-invert improves the prose styling for dark mode.

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files Patch % Lines
...omponents/course-page/share-progress-modal/icon.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3d488b3 and 44156a4.

Files ignored due to path filters (1)
  • public/images/social-icons/twitter-white.svg is excluded by !**/*.svg
Files selected for processing (6)
  • app/components/course-page/configure-github-integration-modal.hbs (1 hunks)
  • app/components/course-page/configure-github-integration-modal/fix-github-app-installation-prompt.hbs (1 hunks)
  • app/components/course-page/configure-github-integration-modal/step.hbs (1 hunks)
  • app/components/course-page/share-progress-modal.hbs (1 hunks)
  • app/components/course-page/share-progress-modal.ts (1 hunks)
  • app/components/course-page/share-progress-modal/icon.ts (3 hunks)
Files skipped from review due to trivial changes (2)
  • app/components/course-page/configure-github-integration-modal.hbs
  • app/components/course-page/share-progress-modal.ts
Additional comments not posted (9)
app/components/course-page/configure-github-integration-modal/step.hbs (1)

3-3: LGTM! Dark mode class added.

The addition of the dark:text-teal-500 class enhances the visual appearance of the title in dark mode.

app/components/course-page/share-progress-modal.hbs (2)

2-2: LGTM! Dark mode class added to the header.

The addition of the dark:text-gray-50 class improves the readability of the header text in dark mode.


9-9: LGTM! Dark mode classes added to the Textarea component.

The updates to the Textarea component, including the dark:border-gray-800/60, dark:placeholder-gray-700, dark:bg-gray-950, and dark:text-gray-50 classes, enhance the visual consistency and readability in dark mode.

app/components/course-page/configure-github-integration-modal/fix-github-app-installation-prompt.hbs (2)

1-1: LGTM! Dark mode classes added to the outer <div>.

The addition of the dark:border-red-700/40 and dark:bg-red-950/40 classes improves the visibility of the warning message in dark mode.


4-4: LGTM! Dark mode class added to the inner <div>.

The addition of the dark:text-red-300 class enhances the readability of the warning message text in dark mode.

app/components/course-page/share-progress-modal/icon.ts (4)

2-2: Import statement for DarkModeService added.

The import statement for DarkModeService has been correctly added.


7-7: Import statement for twitterWhiteLogoImage added.

The import statement for twitterWhiteLogoImage has been correctly added.


24-24: New service declaration for DarkModeService.

The darkMode service is correctly declared using the @service decorator.


35-40: Refactored method for selecting platform logos.

The method for selecting platform logos has been refactored to use an object mapping approach. This improves readability and maintainability. Additionally, the method now conditionally selects the Twitter logo based on the dark mode status.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 44156a4 and 0066ab0.

Files selected for processing (1)
  • app/components/course-page/configure-github-integration-modal/fix-github-app-installation-prompt.hbs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/components/course-page/configure-github-integration-modal/fix-github-app-installation-prompt.hbs

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0066ab0 and ef2ca3b.

Files selected for processing (2)
  • app/components/course-page/share-progress-modal.ts (1 hunks)
  • tests/acceptance/course-page/share-progress-test.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/components/course-page/share-progress-modal.ts
Additional comments not posted (3)
tests/acceptance/course-page/share-progress-test.js (3)

71-73: LGTM! The change to assert.contains improves readability.

The updated assertion method enhances readability and clarity.


77-79: LGTM! The change to assert.contains improves readability.

The updated assertion method enhances readability and clarity.


85-87: LGTM! The change to assert.contains improves readability.

The updated assertion method enhances readability and clarity.

@rohitpaulk rohitpaulk merged commit 76b0af7 into main Jul 30, 2024
5 of 7 checks passed
@rohitpaulk rohitpaulk deleted the add-dark-mode-upgrade-flow branch July 30, 2024 22:07
@coderabbitai coderabbitai bot mentioned this pull request Nov 8, 2024
3 tasks
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