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(ui-core): mobile error should also have border #16743

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

disaerna
Copy link
Member

@disaerna disaerna commented Nov 6, 2024

Design system - Error screen mobile

What

Add border to mobile error screens

Why

Specify why you need to achieve this

Screenshots / Gifs

Attach Screenshots / Gifs to help reviewers understand the scope of the pull request

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • Style
    • Simplified style definitions for the problem template container, enhancing clarity and maintainability.
    • Removed responsive utility for certain styles, resulting in more direct property assignments for borders and colors.

Copy link
Contributor

coderabbitai bot commented Nov 6, 2024

Walkthrough

The changes in this pull request focus on the ProblemTemplate.css.ts file, where the style definitions for the problemTemplateContainer and its variants have been simplified. The modifications involve removing the themeUtils.responsiveStyle wrapper for base styles and variant styles, allowing for direct property assignments. The problemTemplateImg style remains unchanged, retaining its responsive behavior. Overall, the changes streamline the CSS definitions by eliminating unnecessary complexity in the style implementations.

Changes

File Path Change Summary
libs/island-ui/core/src/lib/ProblemTemplate/ProblemTemplate.css.ts Simplified style definitions for problemTemplateContainer and its variants by removing themeUtils.responsiveStyle. Direct property assignments for borderWidth, borderRadius, and borderColor are now used. problemTemplateImg remains unchanged.

Possibly related PRs

Suggested labels

automerge

Suggested reviewers

  • snaerseljan

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

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

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.45%. Comparing base (5101411) to head (a1df517).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16743   +/-   ##
=======================================
  Coverage   36.44%   36.45%           
=======================================
  Files        6852     6853    +1     
  Lines      143492   143581   +89     
  Branches    40952    40992   +40     
=======================================
+ Hits        52290    52336   +46     
- Misses      91202    91245   +43     
Flag Coverage Δ
air-discount-scheme-web 0.00% <ø> (ø)
api 3.34% <ø> (ø)
application-api-files 62.45% <ø> (ø)
application-core 70.98% <ø> (-0.08%) ⬇️
application-system-api 40.97% <ø> (ø)
application-template-api-modules 27.63% <ø> (-0.01%) ⬇️
application-templates-accident-notification 28.98% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 25.87% <ø> (ø)
application-templates-driving-license 18.26% <ø> (ø)
application-templates-estate 12.14% <ø> (ø)
application-templates-example-payment 24.80% <ø> (ø)
application-templates-financial-aid 15.48% <ø> (ø)
application-templates-general-petition 23.07% <ø> (ø)
application-templates-inheritance-report 6.52% <ø> (ø)
application-templates-marriage-conditions 15.04% <ø> (ø)
application-templates-mortgage-certificate 43.22% <ø> (ø)
application-templates-parental-leave 29.83% <ø> (ø)
application-types 6.60% <ø> (ø)
application-ui-components 1.27% <ø> (ø)
application-ui-shell 20.83% <ø> (ø)
auth-react 21.85% <ø> (ø)
clients-charge-fjs-v2 24.11% <ø> (ø)
contentful-apps 4.69% <ø> (ø)
financial-aid-backend 51.26% <ø> (ø)
financial-aid-shared 17.81% <ø> (ø)
island-ui-core 28.88% <ø> (ø)
judicial-system-web 27.13% <ø> (ø)
portals-admin-regulations-admin 1.85% <ø> (ø)
portals-core 15.89% <ø> (ø)
services-auth-personal-representative 45.59% <ø> (ø)
shared-components 26.90% <ø> (ø)
shared-form-fields 31.26% <ø> (ø)
web 1.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5101411...a1df517. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Nov 6, 2024

Datadog Report

All test runs df62ef4 🔗

34 Total Test Services: 0 Failed, 32 Passed
🔻 Test Sessions change in coverage: 1 decreased (-0.1%), 149 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-web 0 0 0 2 0 9.32s 1 no change Link
api 0 0 0 4 0 2.43s 1 no change Link
application-api-files 0 0 0 2 0 5.28s 1 no change Link
application-core 0 0 0 97 0 20.29s 1 decreased (-0.1%) Link
application-system-api 0 0 0 112 2 3m 24.57s 1 no change Link
application-template-api-modules 0 0 0 113 0 2m 1.25s 1 no change Link
application-templates-accident-notification 0 0 0 148 0 15.75s 1 no change Link
application-templates-criminal-record 0 0 0 2 0 10.23s 1 no change Link
application-templates-driving-license 0 0 0 13 0 13.46s 1 no change Link
application-templates-example-payment 0 0 0 2 0 10.56s 1 no change Link

🔻 Code Coverage Decreases vs Default Branch (1)

  • application-core - jest 78.59% (-0.1%) - Details

@disaerna disaerna marked this pull request as ready for review November 8, 2024 15:13
@disaerna disaerna requested a review from a team as a code owner November 8, 2024 15:13
@disaerna disaerna requested a review from Toti91 November 8, 2024 15:13
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 (1)
libs/island-ui/core/src/lib/ProblemTemplate/ProblemTemplate.css.ts (1)

Line range hint 1-43: LGTM! Well-structured design system implementation.

The implementation follows best practices for a design system:

  • Proper use of vanilla-extract for type-safe CSS
  • Theme tokens for consistent styling
  • Modular and reusable structure

Consider adding JSDoc comments to document the component's usage patterns and variants.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1d99e3f and 1b83cd4.

📒 Files selected for processing (1)
  • libs/island-ui/core/src/lib/ProblemTemplate/ProblemTemplate.css.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
libs/island-ui/core/src/lib/ProblemTemplate/ProblemTemplate.css.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
🔇 Additional comments (3)
libs/island-ui/core/src/lib/ProblemTemplate/ProblemTemplate.css.ts (3)

12-14: LGTM! Proper usage of design system tokens.

The implementation correctly uses the theme color token for consistency.


17-19: LGTM! Consistent implementation across color variants.

Both blue and yellow variants maintain consistency with the red variant and properly utilize theme tokens.

Also applies to: 22-24


27-30: Document use cases for noBorder variant.

Given that the PR's objective is to ensure mobile errors have borders, please document when this variant should be used. This will help prevent accidental removal of borders where they're needed.

@disaerna disaerna added the automerge Merge this PR as soon as all checks pass label Nov 12, 2024
@kodiakhq kodiakhq bot merged commit 171a0a6 into main Nov 13, 2024
120 of 121 checks passed
@kodiakhq kodiakhq bot deleted the ui-core/mobile-problem branch November 13, 2024 09:28
jonnigs pushed a commit that referenced this pull request Nov 26, 2024
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants