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

fix: task card styling update #15068

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Jondyr
Copy link
Member

@Jondyr Jondyr commented Mar 26, 2025

Description

  • More spacing between card content and sides/bottom
  • Heading/task name is now xs
  • Fix edit mode border width and radius

image

Before

image

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Summary by CodeRabbit

  • Style
    • Increased padding in icon card components to enhance visual spacing.
    • Updated task card border styling by introducing a dynamic border width and removing rounded corners for a cleaner appearance.
    • Adjusted task card heading size to a smaller, more compact display.

Copy link
Contributor

coderabbitai bot commented Mar 26, 2025

📝 Walkthrough

Walkthrough

This pull request updates styling details across legacy and task components. It increases the padding in a legacy icon card, modifies the border styling—including the removal of rounded corners—in a task card, and adjusts the heading size in the task card component. No changes are made to exported entities.

Changes

File(s) Change Summary
frontend/libs/.../StudioIconCard.module.css Updated the .content class padding values: changed from var(--fds-spacing-4)/var(--fds-spacing-5) to var(--fds-spacing-6)/var(--fds-spacing-7), increasing the spacing.
frontend/packages/ux-editor/.../TaskCard.module.css Modified the .editcard class: replaced the existing border declaration with one that includes var(--fds-border_width-active) and removed the border-radius property.
frontend/packages/ux-editor/.../TaskCard.tsx Changed the StudioHeading component’s size from sm to xs within the task card component.

Possibly related PRs

Suggested labels

skip-manual-testing

Suggested reviewers

  • Konrad-Simso

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.

frontend/libs/studio-components-legacy/src/components/StudioIconCard/StudioIconCard.module.css

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-storybook".

(The package "eslint-plugin-storybook" was not found when loaded as a Node module from the directory "/frontend/libs/studio-components-legacy".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-storybook@latest --save-dev

The plugin "eslint-plugin-storybook" was referenced from the config file in "frontend/libs/studio-components-legacy/.eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.


📜 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 2bd8d15 and 6a1bc38.

📒 Files selected for processing (3)
  • frontend/libs/studio-components-legacy/src/components/StudioIconCard/StudioIconCard.module.css (1 hunks)
  • frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.module.css (1 hunks)
  • frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.tsx
  • frontend/libs/studio-components-legacy/src/components/StudioIconCard/StudioIconCard.module.css
  • frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.module.css
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Build environment and run e2e test
  • GitHub Check: CodeQL
  • GitHub Check: Testing

🪧 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.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

@github-actions github-actions bot added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Mar 26, 2025
@Jondyr Jondyr self-assigned this Mar 26, 2025
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

🧹 Nitpick comments (2)
frontend/libs/studio-components-legacy/src/components/StudioIconCard/StudioIconCard.module.css (1)

28-29: Increased Padding for Enhanced Spacing

The updated padding values (using var(--fds-spacing-6) for overall padding and var(--fds-spacing-7) for the bottom) correctly increase the spacing inside the card content as per the design update. Please verify that these new spacing values align with the overall design system.

frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.module.css (1)

19-21: Revised Border Styling for Edit Mode

The .editcard class now uses a dynamic border declaration:

border: var(--fds-border_width-active) var(--fds-semantic-border-first-active) solid;

This change removes the rounded corners as required and applies a dynamic border width. For clarity and conventionality, consider reordering the border shorthand properties to the typical order (width, style, color). For example:

-  border: var(--fds-border_width-active) var(--fds-semantic-border-first-active) solid;
+  border: var(--fds-border_width-active) solid var(--fds-semantic-border-first-active);

This makes it clearer that solid is the border style and ensures better readability.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 598a9d3 and 2bd8d15.

📒 Files selected for processing (3)
  • frontend/libs/studio-components-legacy/src/components/StudioIconCard/StudioIconCard.module.css (1 hunks)
  • frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.module.css (1 hunks)
  • frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build environment and run e2e test
  • GitHub Check: Testing
🔇 Additional comments (1)
frontend/packages/ux-editor/src/components/TaskNavigation/TaskCard.tsx (1)

88-90: Updated Heading Size to 'xs'

The heading for displaying layoutSetModel.id has been updated to use size='xs', which provides a subtler visual weight as intended. Ensure that this change maintains the desired visual hierarchy within the task card, especially in contrast to the surrounding StudioParagraph elements.

@Jondyr Jondyr force-pushed the fix/task-card-styling-update branch from 2bd8d15 to 6a1bc38 Compare March 26, 2025 11:54
@Jondyr Jondyr assigned Annikenkbrathen and Ildest and unassigned Jondyr Mar 26, 2025
@Jondyr Jondyr added the skip-manual-testing PRs that do not need to be tested manually label Mar 26, 2025
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.92%. Comparing base (598a9d3) to head (6a1bc38).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15068   +/-   ##
=======================================
  Coverage   95.92%   95.92%           
=======================================
  Files        1989     1989           
  Lines       25819    25819           
  Branches     2916     2916           
=======================================
  Hits        24767    24767           
  Misses        788      788           
  Partials      264      264           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. frontend skip-manual-testing PRs that do not need to be tested manually solution/studio/designer Issues related to the Altinn Studio Designer solution. team/studio-domain2
Projects
Status: 🔎 Review
Development

Successfully merging this pull request may close these issues.

3 participants