Skip to content

[457] Create styles for Case Study card on summary page#84

Closed
yuramax wants to merge 9 commits into
mainfrom
457-create-styles-for-case-study-card-on-summary-page
Closed

[457] Create styles for Case Study card on summary page#84
yuramax wants to merge 9 commits into
mainfrom
457-create-styles-for-case-study-card-on-summary-page

Conversation

@yuramax
Copy link
Copy Markdown
Contributor

@yuramax yuramax commented May 13, 2025

  • Create responsive styles for Case Study card on summary page
  • Create reusable text-truncate mixin in _mixins.scss

yuramax added 4 commits May 13, 2025 10:27
- Remove outdated case styles and padding
- Add responsive styles for case study cards
- Create responsive line-height mixin
- Add font-weight-300 variable
- Update case study card HTML structure
- Create reusable text-truncate mixin in _mixins.scss
- Replace repetitive text truncation styles with mixin in case study cards
- Add margin to cards container and remove box-shadow from cards
- Remove border on large screens for case study cards
@yuramax yuramax requested a review from killev as a code owner May 13, 2025 20:33
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2025

📝 Walkthrough

Walkthrough

The changes update SCSS styling and HTML template markup for case study cards, introducing new responsive mixins, variables, and modular CSS class structures. The button styles are adjusted for responsive font sizing and overflow handling. The case studies page template is updated to reflect new class names and content structure. No JavaScript or control flow changes were made.

Changes

File(s) Change Summary
website/modules/asset/ui/src/scss/_buttons.scss Replaced explicit .sf-button font-size declarations with a responsive font-size mixin; set overflow: initial for .sf-button--empty to override inherited overflow.
website/modules/asset/ui/src/scss/_cases.scss Removed old .cs_* grid and card styles; added new .cs_grid and .cs_card styles with nested selectors for images, placeholders, and details; implemented responsive typography and layout; removed .cs_container padding.
website/modules/asset/ui/src/scss/_mixins.scss Added three new SCSS mixins: responsive-font for responsive font sizes, responsive-line-height for responsive line heights, and text-truncate for configurable single- or multi-line text truncation with ellipsis.
website/modules/asset/ui/src/scss/_variables.scss Added two new SCSS variables: $whisper (color #e7e7e7) and $font-weight-300 (weight 300).
website/modules/case-studies-page/views/index.html Updated CSS class names in markup to match new styles; replaced .cs_image with .image; added static text elements below title; simplified tech stack display; removed descriptor paragraph; no changes to control flow or logic.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant Template (index.html)
    participant SCSS

    User->>Browser: Requests case studies page
    Browser->>Template (index.html): Loads updated HTML template
    Template (index.html)->>SCSS: Applies new class names and responsive styles
    SCSS->>Browser: Provides updated modular and responsive styles
    Browser->>User: Renders updated case study cards with new layout and typography
Loading

Suggested reviewers

  • Anton-88
  • killev

📜 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 fd72fbe and f61282a.

📒 Files selected for processing (1)
  • website/modules/asset/ui/src/scss/_mixins.scss (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/modules/asset/ui/src/scss/_mixins.scss
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: sonarqube
  • GitHub Check: e2e-tests
  • GitHub Check: lint
  • GitHub Check: security-scan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this 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.

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.

@yuramax yuramax changed the title refactor: Improve case study card styles with text truncation mixin [457] Create styles for Case Study card on summary page May 13, 2025
@yuramax yuramax self-assigned this May 13, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2025

🔍 Vulnerabilities of apostrophe-cms:test

📦 Image Reference apostrophe-cms:test
digestsha256:012220c4a26deaa9c3ed81857e96c1ccc43fffdbebf9f99480e86d9847388e6c
vulnerabilitiescritical: 0 high: 2 medium: 0 low: 0
platformlinux/amd64
size283 MB
packages934
📦 Base Image node:23-alpine
also known as
  • 23-alpine3.21
  • 23.11-alpine
  • 23.11-alpine3.21
  • 23.11.1-alpine
  • 23.11.1-alpine3.21
digestsha256:169ee1b69bd3f5c7c8508a9919e8b367bba9dc7fa9a03097ec9f85d2e8179631
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
critical: 0 high: 1 medium: 0 low: 0 async 0.9.2 (npm)

pkg:npm/async@0.9.2

high 7.8: CVE--2021--43138 OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities

Affected range<2.6.4
Fixed version2.6.4, 3.2.2
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score1.061%
EPSS Percentile76th percentile
Description

A vulnerability exists in Async through 3.2.1 (fixed in 3.2.2), which could let a malicious user obtain privileges via the mapValues() method.

critical: 0 high: 1 medium: 0 low: 0 async 1.5.2 (npm)

pkg:npm/async@1.5.2

high 7.8: CVE--2021--43138 OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities

Affected range<2.6.4
Fixed version2.6.4, 3.2.2
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score1.061%
EPSS Percentile76th percentile
Description

A vulnerability exists in Async through 3.2.1 (fixed in 3.2.2), which could let a malicious user obtain privileges via the mapValues() method.

Copy link
Copy Markdown
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: 2

🧹 Nitpick comments (4)
website/modules/asset/ui/src/scss/_mixins.scss (2)

17-23: Add SassDoc comments for clarity
Providing documentation for new mixins helps maintainability. Consider adding top-level comments describing parameters and usage for responsive-font.


25-31: Document responsive-line-height mixin parameters
A brief SassDoc above this mixin will clarify its purpose and the meaning of $mobile-line-height vs $desktop-line-height.

website/modules/asset/ui/src/scss/_buttons.scss (1)

133-133: Override inherited truncation styles for empty buttons
While you've reset overflow, the inherited white-space: nowrap and text-overflow: ellipsis can still constrain content. To fully restore natural flow, consider:

 .sf-button--empty {
   overflow: initial;
+  white-space: normal;
+  text-overflow: clip;
 }
website/modules/asset/ui/src/scss/_cases.scss (1)

284-322: Namespace nested classes to prevent collisions
The generic class names .type, .industry, and .stack are scoped only by nesting under .cs_card .cs_details, but could still collide in a large stylesheet. Consider adopting a BEM-style or prefixed naming (e.g., .cs-card__type) for clearer intent and to avoid unintended overrides.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2f8e441 and fd72fbe.

📒 Files selected for processing (5)
  • website/modules/asset/ui/src/scss/_buttons.scss (2 hunks)
  • website/modules/asset/ui/src/scss/_cases.scss (1 hunks)
  • website/modules/asset/ui/src/scss/_mixins.scss (2 hunks)
  • website/modules/asset/ui/src/scss/_variables.scss (1 hunks)
  • website/modules/case-studies-page/views/index.html (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: sonarqube
  • GitHub Check: e2e-tests
  • GitHub Check: security-scan
🔇 Additional comments (5)
website/modules/asset/ui/src/scss/_variables.scss (1)

13-17: New style tokens introduced correctly
The $whisper color and $font-weight-300 weight align with the existing naming conventions and support the updated card styles.

website/modules/asset/ui/src/scss/_buttons.scss (1)

27-27: Responsive typography integrated
Using @include responsive-font(14px, 20px) here correctly replaces the static font sizes for buttons.

website/modules/case-studies-page/views/index.html (3)

62-70: Image markup updated to match new styles
The <img class="image"> correctly maps to the .image rules in _cases.scss, preserving lazy loading and dimensions.


93-93: Portfolio title element updated
The <h4 class="portfolio-title"> correctly uses the new class and conditional logic for dynamic portfolio titles.


97-97: Stack element mapping correct
Rendering <div class="stack">{{ article.stack }}</div> aligns with the new .stack styles for truncation and font settings.

Comment thread website/modules/asset/ui/src/scss/_mixins.scss Outdated
Comment thread website/modules/case-studies-page/views/index.html
- Added display:block to the text-truncate mixin's non-multiline option for consistent rendering
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 14, 2025
VitalyyP
VitalyyP previously approved these changes May 15, 2025
Copy link
Copy Markdown
Contributor

@VitalyyP VitalyyP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yuramax yuramax dismissed stale reviews from VitalyyP and coderabbitai[bot] via 54d47d5 May 15, 2025 20:56
@yuramax yuramax requested a review from VitalyyP May 16, 2025 07:20
@sonarqubecloud
Copy link
Copy Markdown

@yuramax
Copy link
Copy Markdown
Contributor Author

yuramax commented May 16, 2025

The changes are already merged via other PRs. Closing this one.

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.

2 participants