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

Release #717

Merged
merged 5 commits into from
Jan 21, 2025
Merged

Release #717

merged 5 commits into from
Jan 21, 2025

Conversation

Cahllagerfeld
Copy link
Contributor

@Cahllagerfeld Cahllagerfeld commented Jan 21, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added copy buttons for stack name and ID in stack management.
    • Added AWS Image Builder component in infrastructure creation.
    • Enhanced search field with search icon.
  • Improvements

    • Updated onboarding and settings text for clarity around ZenML login.
    • Made artifact store label clickable in artifact details.
    • Improved artifact node data representation with input/output types.
  • UI/UX Changes

    • Updated search field layout.
    • Made stack set command card open by default.

Cahllagerfeld and others added 4 commits January 9, 2025 15:17
* fix: add missing "copy" button to stack's name

* fix: open "set this stack" by default

* fix: link to "artifact store" stack component from artifact overview
Copy link
Contributor

coderabbitai bot commented Jan 21, 2025

Walkthrough

This pull request encompasses several modifications across different components in the ZenML web application. The changes primarily focus on text corrections, UI enhancements, and data structure improvements. Key updates include adding copy buttons to stack columns, introducing an AWS Image Builder component, modifying search field styling, and enhancing artifact node representations with type information.

Changes

File Change Summary
src/app/onboarding/Setup/Items.tsx Updated text from "Install and Connect ZenML" to "Install and log in to ZenML"
src/app/settings/service-accounts/[service-account-id]/Success.tsx Corrected login phrase from "To login" to "To log in"
src/app/stacks/columns.tsx Added CopyButton for stack name and stack ID
src/app/stacks/create/new-infrastructure/Providers/AWS.tsx Added AWS Image Builder ComponentListItem
src/components/SearchField.tsx Integrated search icon, simplified updateSearchQuery logic
src/components/artifacts/artifact-node-sheet/DetailCards.tsx Added clickable link for Artifact Store
src/components/dag-visualizer/layout/helper.ts Enhanced artifact merging logic
src/components/dag-visualizer/layout/real-data.ts Added artifactType to artifact nodes
src/components/stacks/Sheet/index.tsx Made CollapsibleCard open by default
src/types/pipeline-runs.ts Updated ArtifactNodeDetails type with artifactType

Possibly related PRs

Poem

🐰 A Rabbit's Ode to Code Refinement 🔧

Bits and bytes, now polished bright,
Copy buttons dancing with delight,
Search icons gleaming, artifacts clear,
Each change a whisker's tweak, oh so dear!
Code hops forward with playful might! 🚀


📜 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 04b8967 and b0e2e38.

📒 Files selected for processing (1)
  • src/components/artifacts/artifact-node-sheet/DetailCards.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/artifacts/artifact-node-sheet/DetailCards.tsx

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. (Beta)
  • @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

🧹 Nitpick comments (5)
src/app/stacks/columns.tsx (1)

Line range hint 31-36: Consider adding aria-labels for better accessibility.

The copy buttons enhance usability. Consider adding descriptive aria-labels to improve accessibility.

-<CopyButton copyText={name}></CopyButton>
+<CopyButton copyText={name} aria-label={`Copy stack name: ${name}`} />
-<CopyButton copyText={id} />
+<CopyButton copyText={id} aria-label={`Copy stack ID: ${id}`} />
src/components/SearchField.tsx (1)

68-81: Consider enhancing keyboard accessibility.

The search icon integration looks good, but consider adding aria-label to improve accessibility for screen readers.

 <div className="relative">
   <Input
     className="pl-[36px]"
+    aria-label="Search input field"
     {...rest}
     ref={ref}
     value={searchQuery}
     onChange={searchHandler}
     placeholder="Search..."
     inputSize="md"
   />
   <div className="absolute inset-y-0 left-0 flex items-center pl-1">
-    <Search className="size-4 fill-neutral-400" />
+    <Search className="size-4 fill-neutral-400" aria-hidden="true" />
   </div>
 </div>
src/components/dag-visualizer/layout/real-data.ts (1)

39-39: Consider using a type constant for better maintainability.

The artifactType implementation is consistent. Consider defining a constant for the artifact types to maintain consistency and type safety across the codebase.

// Add to types/pipeline-runs.ts
export const ARTIFACT_TYPES = {
  INPUT: 'input',
  OUTPUT: 'output'
} as const;
export type ArtifactType = typeof ARTIFACT_TYPES[keyof typeof ARTIFACT_TYPES];

// Then update the usage:
data: { ...version, name: outputName, artifactType: ARTIFACT_TYPES.OUTPUT }
data: { ...artifactVersion, name: inputName, artifactType: ARTIFACT_TYPES.INPUT }

Also applies to: 52-52

src/components/dag-visualizer/layout/helper.ts (1)

71-82: Consider a more functional approach for handling duplicates.

While the logic is correct, consider using a more functional and immutable approach instead of mutating the array with splice.

Here's a suggested refactoring that maintains immutability:

-			if (realArtifact.data.artifactType === "output") {
-				for (const node of duplicateRealArtifacts) {
-					// remove node from finalNodes based on id
-					const index = finalNodes.findIndex((finalNode) => finalNode.id === node.id);
-					if (index !== -1) {
-						finalNodes.splice(index, 1);
-					}
-				}
-
-				finalNodes.push(realArtifact);
-			}
+			if (realArtifact.data.artifactType === "output") {
+				const filteredNodes = finalNodes.filter(node => !duplicateRealArtifacts.some(dup => dup.id === node.id));
+				finalNodes = [...filteredNodes, realArtifact];
+			}
src/components/artifacts/artifact-node-sheet/DetailCards.tsx (1)

186-186: Consider handling invalid routes more gracefully.

The empty string fallback for undefined artifactStoreId could lead to invalid routes. Also, the explicit type annotation is redundant as TypeScript can infer it.

-const artifactStoreHref: string = routes.components.detail(artifactStoreId || "");
+const artifactStoreHref = artifactStoreId ? routes.components.detail(artifactStoreId) : "#";
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 00d74e3 and 04b8967.

📒 Files selected for processing (10)
  • src/app/onboarding/Setup/Items.tsx (2 hunks)
  • src/app/settings/service-accounts/[service-account-id]/Success.tsx (2 hunks)
  • src/app/stacks/columns.tsx (1 hunks)
  • src/app/stacks/create/new-infrastructure/Providers/AWS.tsx (1 hunks)
  • src/components/SearchField.tsx (3 hunks)
  • src/components/artifacts/artifact-node-sheet/DetailCards.tsx (2 hunks)
  • src/components/dag-visualizer/layout/helper.ts (1 hunks)
  • src/components/dag-visualizer/layout/real-data.ts (2 hunks)
  • src/components/stacks/Sheet/index.tsx (1 hunks)
  • src/types/pipeline-runs.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/app/settings/service-accounts/[service-account-id]/Success.tsx
🔇 Additional comments (5)
src/types/pipeline-runs.ts (1)

14-14: LGTM! Well-structured type definition.

The addition of artifactType with string literal type "input" | "output" provides clear type safety for artifact classification.

src/components/SearchField.tsx (1)

40-43: Simplified conditional check looks good.

The simplified check for inMemoryHandler is cleaner and maintains the same functionality.

src/app/stacks/create/new-infrastructure/Providers/AWS.tsx (1)

92-104: LGTM! Well-structured AWS Image Builder component.

The new AWS Image Builder component follows the established pattern and maintains consistency with other components in the file.

src/app/onboarding/Setup/Items.tsx (1)

21-21: LGTM! Improved text consistency.

Good improvement in grammar and consistency by changing "Login" to "Log in" when used as a verb.

Also applies to: 31-31

src/components/stacks/Sheet/index.tsx (1)

167-167: LGTM! Better UX with initially open card.

Good improvement to show the stack setup instructions immediately by setting initialOpen on the CollapsibleCard.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Cahllagerfeld Cahllagerfeld merged commit bfbe96d into main Jan 21, 2025
5 checks passed
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