Skip to content

[693] Fix names truncation - #183

Merged
Anton-88 merged 3 commits into
mainfrom
693-fix/trusted-names-truncation
Jul 2, 2025
Merged

[693] Fix names truncation#183
Anton-88 merged 3 commits into
mainfrom
693-fix/trusted-names-truncation

Conversation

@IhorMasechko

Copy link
Copy Markdown
Contributor

Changes:

  • Updated text display to support up to two lines instead of one

  • Applied truncation after the second line (multi-line ellipsis)

@IhorMasechko
IhorMasechko requested a review from killev as a code owner June 30, 2025 13:12
@coderabbitai

coderabbitai Bot commented Jun 30, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

"""

Walkthrough

This update restructures the testimonial card layout by introducing new wrapper and container divs in the HTML and adjusts related SCSS styles for both carousel and testimonial components. It refines margins, paddings, line heights, truncation limits, and removes certain spacing rules to achieve a more compact and flexible testimonial presentation.

Changes

Files/Groups Change Summary
website/modules/asset/ui/src/scss/_carousel.scss Added .sf-person__wrapper and .sf-person__container classes; adjusted margins, line heights, and truncation.
website/modules/asset/ui/src/scss/_testimonials.scss Reduced padding and margins for testimonial bio and organization; updated font settings for .sf-person__title.
website/modules/testimonials-carousel-widget/views/widget.html Wrapped title, position, and organization in new container divs for improved structure and styling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TestimonialsWidget
    participant SCSS

    User->>TestimonialsWidget: Loads testimonials carousel
    TestimonialsWidget->>TestimonialsWidget: Renders testimonial card HTML with new wrapper/container divs
    TestimonialsWidget->>SCSS: Applies updated styles for layout, spacing, and truncation
    SCSS-->>TestimonialsWidget: Styles testimonial card elements
    TestimonialsWidget-->>User: Displays updated testimonial card layout
Loading

Possibly related PRs

Suggested reviewers

  • yuramax
  • 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 a63138b and a75b956.

📒 Files selected for processing (2)
  • website/modules/asset/ui/src/scss/_carousel.scss (1 hunks)
  • website/modules/asset/ui/src/scss/_testimonials.scss (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • website/modules/asset/ui/src/scss/_testimonials.scss
  • website/modules/asset/ui/src/scss/_carousel.scss
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: security-scan
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: e2e-tests
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)

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.

@IhorMasechko IhorMasechko self-assigned this Jun 30, 2025
@github-actions

github-actions Bot commented Jun 30, 2025

Copy link
Copy Markdown

🔍 Vulnerabilities of apostrophe-cms:test

📦 Image Reference apostrophe-cms:test
digestsha256:866743be9de0239a0923550a182278b6dbe816047e2a81053a9a4fbaec47bd66
vulnerabilitiescritical: 0 high: 3 medium: 0 low: 0
platformlinux/amd64
size290 MB
packages977
📦 Base Image node:23-alpine
also known as
  • 23-alpine3.22
  • 23.11-alpine
  • 23.11-alpine3.22
  • 23.11.1-alpine
  • 23.11.1-alpine3.22
digestsha256:b9d38d589853406ff0d4364f21969840c3e0397087643aef8eede40edbb6c7cd
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 1
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 Score0.419%
EPSS Percentile61st 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 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 Score0.419%
EPSS Percentile61st 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 connect-multiparty 2.2.0 (npm)

pkg:npm/connect-multiparty@2.2.0

high 7.8: CVE--2022--29623 Unrestricted Upload of File with Dangerous Type

Affected range<=2.2.0
Fixed versionNot Fixed
CVSS Score7.8
CVSS VectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score0.334%
EPSS Percentile56th percentile
Description

An arbitrary file upload vulnerability in the file upload module of Express Connect-Multiparty 2.2.0 allows attackers to execute arbitrary code via a crafted PDF file. NOTE: the Supplier has not verified this vulnerability report.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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)
website/modules/asset/ui/src/scss/_testimonials.scss (2)

40-44: Padding shorthand inconsistency could break horizontal alignment
The default breakpoint uses a 4-value padding (4px 12px 0 24px), but the medium breakpoint switches to the 3-value form (32px 40px 0).
That implicitly sets left = right = 40 px, losing the original 24 px left offset. On medium screens the bio block may visually “jump” to the right compared with the image column.

-  padding: 32px 40px 0;
+  /* keep 4-value shorthand for consistent left offset */
+  padding: 32px 40px 0 24px;

58-60: Duplicate font override between _testimonials.scss and _carousel.scss
_testimonials.scss sets the medium-breakpoint font for .sf-person__title, but an almost-identical rule exists (with different defaults) in _carousel.scss. If the import order changes, the resulting font-size/line-height will be unpredictable. Consider colocating this rule in a single partial or adding an explicit !default strategy to avoid cascade fights.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3bcb9c4 and a63138b.

📒 Files selected for processing (3)
  • website/modules/asset/ui/src/scss/_carousel.scss (1 hunks)
  • website/modules/asset/ui/src/scss/_testimonials.scss (2 hunks)
  • website/modules/testimonials-carousel-widget/views/widget.html (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: yuramax
PR: speedandfunction/website#121
File: website/modules/asset/ui/src/scss/_vacancies.scss:99-102
Timestamp: 2025-05-26T15:57:01.766Z
Learning: In website/modules/asset/ui/src/scss/_vacancies.scss, the margin shorthand (e.g., `margin: 0 0 8px`) in `.sf-vacancies_footer h2` is intentionally used to reset all margins and set specific bottom margins, rather than using `margin-bottom` alone. This approach ensures clean baseline styling that doesn't inherit unwanted margins, while still allowing the sibling selector `.vacancy-card + .sf-vacancies_footer h2` to add top margins when a vacancy card precedes the footer.
website/modules/asset/ui/src/scss/_carousel.scss (2)
Learnt from: yuramax
PR: speedandfunction/website#121
File: website/modules/asset/ui/src/scss/_vacancies.scss:99-102
Timestamp: 2025-05-26T15:57:01.766Z
Learning: In website/modules/asset/ui/src/scss/_vacancies.scss, the margin shorthand (e.g., `margin: 0 0 8px`) in `.sf-vacancies_footer h2` is intentionally used to reset all margins and set specific bottom margins, rather than using `margin-bottom` alone. This approach ensures clean baseline styling that doesn't inherit unwanted margins, while still allowing the sibling selector `.vacancy-card + .sf-vacancies_footer h2` to add top margins when a vacancy card precedes the footer.
Learnt from: IhorMasechko
PR: speedandfunction/website#132
File: website/modules/asset/ui/src/scss/_not-found.scss:52-64
Timestamp: 2025-05-29T07:16:52.843Z
Learning: In website/modules/asset/ui/src/scss/_not-found.scss, the .two-buttons container with flex-direction: row and child .sf-button elements having width: 100% does not cause overflow issues and renders correctly, despite theoretical expectations.
website/modules/asset/ui/src/scss/_testimonials.scss (2)
Learnt from: yuramax
PR: speedandfunction/website#121
File: website/modules/asset/ui/src/scss/_vacancies.scss:99-102
Timestamp: 2025-05-26T15:57:01.766Z
Learning: In website/modules/asset/ui/src/scss/_vacancies.scss, the margin shorthand (e.g., `margin: 0 0 8px`) in `.sf-vacancies_footer h2` is intentionally used to reset all margins and set specific bottom margins, rather than using `margin-bottom` alone. This approach ensures clean baseline styling that doesn't inherit unwanted margins, while still allowing the sibling selector `.vacancy-card + .sf-vacancies_footer h2` to add top margins when a vacancy card precedes the footer.
Learnt from: IhorMasechko
PR: speedandfunction/website#132
File: website/modules/asset/ui/src/scss/_not-found.scss:52-64
Timestamp: 2025-05-29T07:16:52.843Z
Learning: In website/modules/asset/ui/src/scss/_not-found.scss, the .two-buttons container with flex-direction: row and child .sf-button elements having width: 100% does not cause overflow issues and renders correctly, despite theoretical expectations.
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: lint
  • GitHub Check: e2e-tests
  • GitHub Check: unit-tests
  • GitHub Check: security-scan
🔇 Additional comments (3)
website/modules/asset/ui/src/scss/_carousel.scss (2)

36-46: Two-line truncation & margin reset look good
Setting margin: 0, adjusting line-height to 120 %, and switching to @include truncate-lines(2) neatly implements the multi-line ellipsis requirement without side effects.


47-66: Allow .sf-person__container to shrink on narrow viewports
On very small screens (≈320 px), the image (102 px) plus the 160 px min‐width can exceed the available space and cause overflow.

• In website/modules/asset/ui/src/scss/_carousel.scss (around lines 47–66), update the container:

-  min-width: 160px;
+  /* allow container to shrink on narrow screens */
+  min-width: 0;
+  /* flexibly fill remaining space */
+  flex: 1 1 auto;
website/modules/testimonials-carousel-widget/views/widget.html (1)

35-44: HTML restructuring matches SCSS, but watch the {% endif %} placement
The closing </div> for .sf-person__container is outside the {% if card.organization %} block, which is correct, but the {% endif %} now sits between sibling elements (container close and the following link).
Twig ignores whitespace, yet future edits could accidentally move tags into the conditional. Keep an eye on this when refactoring further. Otherwise the new wrapper / container markup aligns perfectly with the new SCSS.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 30, 2025
VitalyyP
VitalyyP previously approved these changes Jun 30, 2025

@VitalyyP VitalyyP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

yuramax
yuramax previously approved these changes Jun 30, 2025

@yuramax yuramax left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 👍

@IhorMasechko
IhorMasechko dismissed stale reviews from yuramax, VitalyyP, and coderabbitai[bot] via a75b956 July 1, 2025 09:59
@IhorMasechko
IhorMasechko requested review from VitalyyP and yuramax July 1, 2025 10:05

@VitalyyP VitalyyP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@yuramax yuramax left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👌

@Anton-88 Anton-88 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@killev killev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good

@Anton-88
Anton-88 enabled auto-merge (squash) July 2, 2025 10:29
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2025

Copy link
Copy Markdown

@Anton-88
Anton-88 merged commit a235676 into main Jul 2, 2025
12 checks passed
@Anton-88
Anton-88 deleted the 693-fix/trusted-names-truncation branch July 2, 2025 10:32
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.

5 participants