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

Changes frozen to waiting #1551

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Changes frozen to waiting #1551

wants to merge 3 commits into from

Conversation

samejr
Copy link
Member

@samejr samejr commented Dec 11, 2024

Replaced "Frozen" with "Waiting"

  • Updated the Runs page filter menu icon, name and tooltip description
  • Updated the Run page status in the Overview and Details tabs
  • Updated the Runs page docs mdx file

CleanShot 2024-12-11 at 17 22 26

Docs page update
CleanShot 2024-12-11 at 17 36 39

Also improved the hover state on the Shortcut icon in the Select component. It now has a visible border on hover.

CleanShot 2024-12-11 at 17 33 49

Summary by CodeRabbit

  • New Features

    • Enhanced visual feedback for the SelectItem component with updated styles.
    • Improved tooltip positioning for task run statuses.
  • Bug Fixes

    • Updated status representations for task runs, including icon and title changes for clarity.
  • Documentation

    • Revised descriptions and explanations of task run states, replacing "Frozen" with "Waiting" for better understanding.

Copy link

changeset-bot bot commented Dec 11, 2024

⚠️ No Changeset found

Latest commit: ec75ae1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

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.

apps/webapp/app/components/primitives/Select.tsx

Oops! Something went wrong! :(

ESLint: 8.45.0

ESLint couldn't find the config "custom" to extend from. Please check that the name of the config is correct.

The config "custom" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

Walkthrough

The changes in this pull request focus on enhancing the user interface and visual feedback of various components within the web application. Modifications were made to the SelectItem, RunFilters, TaskRunAttemptStatus, and TaskRunStatus components, primarily involving updates to icons, status descriptions, and tooltip positioning. Additionally, the documentation regarding task run states was revised to replace the "Frozen" state with a "Waiting" state, clarifying the lifecycle of task execution.

Changes

File Path Change Summary
apps/webapp/app/components/primitives/Select.tsx Updated ShortcutKey class for transition effects and hover state in SelectItem.
apps/webapp/app/components/runs/v3/RunFilters.tsx Modified TooltipContent sideOffset from 9 to 50 for better tooltip positioning.
apps/webapp/app/components/runs/v3/TaskRunAttemptStatus.tsx Removed PauseCircleIcon, added HourglassIcon, updated "PAUSED" status rendering and titles.
apps/webapp/app/components/runs/v3/TaskRunStatus.tsx Replaced SnowflakeIcon with HourglassIcon, updated status descriptions and titles.
docs/runs.mdx Changed "Frozen" state to "Waiting" in task execution lifecycle documentation.

Possibly related PRs

Suggested reviewers

  • matt-aitken

🐇 In the meadow where the changes bloom,
The Select now dances, dispelling the gloom.
With tooltips that float and icons that gleam,
Task runs now wait, like a soft, gentle dream.
Hopping through code, with joy we will sing,
Celebrating the updates that this pull request brings! 🌼✨


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 generate docstrings to generate docstrings for this PR. (Experiment)
  • @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.

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 (2)
apps/webapp/app/components/primitives/Select.tsx (1)

485-489: LGTM! Consider adjusting transition duration

The hover state implementation for the ShortcutKey looks good and aligns with the PR objectives. However, setting duration-0 effectively disables the transition, which might make the hover effect feel abrupt.

Consider using a short duration instead of disabling the transition completely:

-            className={cn("size-4 flex-none transition duration-0 group-hover:border-charcoal-600")}
+            className={cn("size-4 flex-none transition duration-75 group-hover:border-charcoal-600")}
apps/webapp/app/components/runs/v3/RunFilters.tsx (1)

Line range hint 673-920: Consider refactoring ID-related dropdowns to reduce code duplication.

The RunId, BatchId, and ScheduleId dropdown components share similar structure, validation logic, and error messages. Consider extracting these into a reusable component to improve maintainability.

Create a common component like this:

type IdDropdownProps = {
  idType: 'run' | 'batch' | 'schedule';
  prefix: string;
  length: number;
  value?: string;
  onChange: (value?: string) => void;
  // ... other common props
};

function IdDropdown({ idType, prefix, length, value, onChange, ...props }: IdDropdownProps) {
  const [id, setId] = useState(value);
  
  let error: string | undefined = undefined;
  if (id) {
    if (!id.startsWith(prefix)) {
      error = `${idType} IDs start with '${prefix}'`;
    } else if (id.length !== length) {
      error = `${idType} IDs are ${length} characters long`;
    }
  }
  
  // ... rest of the common implementation
}

This would reduce duplication and make future maintenance easier.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 10f0ef3 and ec75ae1.

📒 Files selected for processing (5)
  • apps/webapp/app/components/primitives/Select.tsx (1 hunks)
  • apps/webapp/app/components/runs/v3/RunFilters.tsx (1 hunks)
  • apps/webapp/app/components/runs/v3/TaskRunAttemptStatus.tsx (4 hunks)
  • apps/webapp/app/components/runs/v3/TaskRunStatus.tsx (6 hunks)
  • docs/runs.mdx (1 hunks)
🔇 Additional comments (4)
apps/webapp/app/components/runs/v3/TaskRunAttemptStatus.tsx (1)

10-10: LGTM! Changes align with the PR objectives.

The changes consistently replace the "Frozen" state with "Waiting" across icons, colors, and text labels. The new visual representation using HourglassIcon and text-charcoal-500 better conveys the waiting state and maintains consistency with other similar states.

Also applies to: 67-67, 93-93, 119-119

apps/webapp/app/components/runs/v3/TaskRunStatus.tsx (2)

57-71: LGTM! Status descriptions are more consistent and clearer.

The descriptions now consistently end with periods and provide clearer explanations of each state.


128-128: LGTM! Visual representation changes are consistent.

The changes to icon, color, and text for the "WAITING_TO_RESUME" state maintain consistency with TaskRunAttemptStatus.tsx and align with the PR objectives.

Also applies to: 167-167, 202-202

docs/runs.mdx (1)

45-46: LGTM! Documentation accurately reflects the UI changes.

The updated description clearly explains when the "Waiting" state occurs and provides helpful links to related documentation (triggerAndWait(), batchTriggerAndWait(), and wait functions).

@@ -356,7 +356,7 @@ function StatusDropdown({
<TooltipTrigger className="group flex w-full flex-col py-0">
<TaskRunStatusCombo status={item.value} iconClassName="animate-none" />
</TooltipTrigger>
<TooltipContent side="right" sideOffset={9}>
<TooltipContent side="right" sideOffset={50}>
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Based on the comprehensive analysis of the codebase, I can now provide a final response:

Inconsistent tooltip offset needs standardization

The increased sideOffset={50} in RunFilters.tsx is inconsistent with the identical component structure in BatchFilters.tsx (sideOffset={9}). Both components:

  • Use the same tooltip structure
  • Display status descriptions in the same way
  • Are used in similar dropdown contexts
  • Share similar component hierarchy

This inconsistency should be standardized to maintain UI consistency across similar components.

  • apps/webapp/app/components/runs/v3/RunFilters.tsx: Line 359 - Revert sideOffset to 9 to match BatchFilters
  • apps/webapp/app/components/runs/v3/BatchFilters.tsx: Line 359 - Keep current sideOffset of 9
🔗 Analysis chain

Verify tooltip positioning with the increased offset.

The significant increase in sideOffset from 9 to 50 pixels might cause layout issues on smaller screens or place the tooltip too far from its trigger element.


The search results show an inconsistency in the sideOffset values between similar components. Let me verify if these components are related or if there's a pattern for different offset values.


The context shows that both tooltips are used in similar dropdown components (BatchFilters and RunFilters) to display status descriptions. However, they have significantly different offsets (9px vs 50px) despite having identical structure and purpose. Let me check if there are any UI-specific requirements or recent changes that justify this difference.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other TooltipContent components to compare offsets
rg "TooltipContent.*sideOffset" -A 1

Length of output: 480


Script:

#!/bin/bash
# Check the context of both tooltip usages to understand their placement and purpose
rg "TooltipContent" -B 5 -A 5 apps/webapp/app/components/runs/v3/RunFilters.tsx apps/webapp/app/components/runs/v3/BatchFilters.tsx

# Search for any design system documentation or constants related to tooltip offsets
fd -e ts -e tsx -e js -e jsx | xargs rg "tooltip.*offset|TOOLTIP.*OFFSET|TooltipContent.*DEFAULT"

Length of output: 4882


Script:

#!/bin/bash
# Check recent changes to these files
git log -p --since="3 months ago" -- apps/webapp/app/components/runs/v3/RunFilters.tsx apps/webapp/app/components/runs/v3/BatchFilters.tsx | grep -A 5 -B 5 "sideOffset"

# Check if there are any related UI components or design system files
fd -e tsx -e ts | xargs rg "TaskRunStatusCombo|BatchStatusCombo" -A 2 -B 2

Length of output: 15001

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.

1 participant