Skip to content

fix: flows title on dashboard are truncating too soon#8696

Merged
ogabrielluiz merged 3 commits into
mainfrom
lfoss-1500
Jun 24, 2025
Merged

fix: flows title on dashboard are truncating too soon#8696
ogabrielluiz merged 3 commits into
mainfrom
lfoss-1500

Conversation

@deon-sanchez
Copy link
Copy Markdown
Collaborator

@deon-sanchez deon-sanchez commented Jun 24, 2025

This pull request includes updates to improve the styling and layout of components on the MainPage. The changes focus on enhancing responsiveness, fixing layout inconsistencies, and improving the user interface for better readability and usability.

Header Component Updates:

  • Removed the redundant -mr-3 class in the HeaderComponent, simplifying the layout logic for better maintainability.

List Component Updates:

  • Replaced the line-clamp-1 class with a more responsive flex-wrap layout, allowing better handling of long text and improving responsiveness.
  • Updated the flow-name-div container to ensure it truncates properly while maintaining flexibility with min-w-0 and flex-shrink for better adaptability in different screen sizes.
  • Added a truncate class to the "Edited" timestamp text, ensuring it doesn't overflow and remains readable within constrained spaces.

FIX

Screenshot 2025-06-23 at 6 26 57 PM

BUG

Screenshot 2025-06-23 at 6 43 36 PM

Summary by CodeRabbit

  • Style
    • Improved spacing and layout of download/delete buttons in the header when flows are selected.
    • Enhanced alignment and truncation of flow names and timestamps in the flow list for better readability and appearance.

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 24, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 24, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Styling adjustments were made to the header and list components in the main page of the frontend. The header's button container spacing was modified by removing a negative margin class, and the list component's flow name and timestamp layout were updated for improved flexbox behavior and truncation.

Changes

File(s) Change Summary
src/frontend/src/pages/MainPage/components/header/index.tsx Removed the negative right margin class from the button container div, affecting horizontal spacing.
src/frontend/src/pages/MainPage/components/list/index.tsx Modified flexbox layout and truncation for flow name and timestamp containers, improving their display behavior.

Suggested labels

size:XS, lgtm, refactor

Suggested reviewers

  • lucaseduoli
✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch lfoss-1500

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 auto-generate unit tests to generate unit tests for 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.

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
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: 0

🧹 Nitpick comments (2)
src/frontend/src/pages/MainPage/components/list/index.tsx (2)

159-170: Expose full flow name on hover for better UX

Nice flex-box rewrite; truncation now works reliably.
However, once the name is ellipsised the user has no way to see the full string. A lightweight improvement is to surface the full name via the title attribute:

-<span
-  className="truncate"
-  data-testid={`flow-name-${flowData.id}`}
->
+<span
+  className="truncate"
+  title={flowData.name}
+  data-testid={`flow-name-${flowData.id}`}
+>

Adds zero JS and helps both desktop and screen-reader users.


171-175: Use semantic <time> element for the “edited” timestamp

For accessibility and machine parsing (e.g. browser extensions, crawlers) wrap the relative text in a <time> tag with the ISO date in dateTime:

-<span className="truncate">
-  Edited {timeElapsed(flowData.updated_at)} ago
-</span>
+<time
+  className="truncate"
+  dateTime={new Date(flowData.updated_at).toISOString()}
+>
+  Edited {timeElapsed(flowData.updated_at)} ago
+</time>

Keeps visual output intact while improving semantics.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aeebbd3 and 25f3162.

📒 Files selected for processing (2)
  • src/frontend/src/pages/MainPage/components/header/index.tsx (1 hunks)
  • src/frontend/src/pages/MainPage/components/list/index.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`src/frontend/**/*.{ts,tsx,js,jsx}`: All React and TypeScript/JavaScript source files for the frontend must reside under src/frontend/ and use .ts, .tsx, .js, or .jsx extensions.

src/frontend/**/*.{ts,tsx,js,jsx}: All React and TypeScript/JavaScript source files for the frontend must reside under src/frontend/ and use .ts, .tsx, .js, or .jsx extensions.

  • src/frontend/src/pages/MainPage/components/header/index.tsx
  • src/frontend/src/pages/MainPage/components/list/index.tsx
`src/frontend/src/pages/**/*`: Page-level React components must be placed under src/frontend/src/pages/.

src/frontend/src/pages/**/*: Page-level React components must be placed under src/frontend/src/pages/.

  • src/frontend/src/pages/MainPage/components/header/index.tsx
  • src/frontend/src/pages/MainPage/components/list/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Validate PR
  • GitHub Check: autofix
🔇 Additional comments (1)
src/frontend/src/pages/MainPage/components/header/index.tsx (1)

194-196: Confirm negative-margin removal does not break horizontal alignment

-mr-3 was dropped and a gap-2 was introduced.
While this simplifies the layout, the parent container still starts with w-0, so any mis-alignment will only be visible after the w-36 transition fires. Please sanity-check the updated spacing in narrow break-points (esp. when the “New Flow” button collapses), as the previous negative margin compensated for the button’s icon padding.

No code change required if visual QA passes.

@deon-sanchez deon-sanchez changed the title Lfoss 1500 fix: flows title on dashboard are truncating too soon Jun 24, 2025
@deon-sanchez deon-sanchez self-assigned this Jun 24, 2025
@github-actions github-actions Bot added the bug Something isn't working label Jun 24, 2025
@github-actions github-actions Bot added the lgtm This PR has been approved by a maintainer label Jun 24, 2025
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 24, 2025
@ogabrielluiz ogabrielluiz added this pull request to the merge queue Jun 24, 2025
Merged via the queue into main with commit 91b983a Jun 24, 2025
32 checks passed
@ogabrielluiz ogabrielluiz deleted the lfoss-1500 branch June 24, 2025 18:14
Khurdhula-Harshavardhan pushed a commit to JigsawStack/langflow that referenced this pull request Jul 1, 2025
* fix: Adjust header component styles for improved layout consistency

* fix: Update ListComponent styles for improved layout and readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants