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

Add privacy note to dataset upload #8354

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

knollengewaechs
Copy link
Contributor

@knollengewaechs knollengewaechs commented Jan 24, 2025

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

See feedback to first draft here: https://scm.slack.com/archives/C5AKLAV0B/p1737750240433629

Steps to test:

  • In the dashboard, click "Add dataset" and view the dataset upload view
  • Check that is looks nice :)
  • Also check the "Add remote dataset" tab and the "Compose from existing datasets" tab
    • the first one also contains the new note, the latter does not, but it should still be aligned nicely

TODOs:

  • ...

Issues:


(Please delete unneeded items, merge only when none are left open)

@knollengewaechs knollengewaechs self-assigned this Jan 24, 2025
Copy link
Contributor

coderabbitai bot commented Jan 24, 2025

Warning

Rate limit exceeded

@knollengewaechs has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 53 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between de31942 and 5412236.

📒 Files selected for processing (1)
  • frontend/javascripts/admin/dataset/dataset_components.tsx (2 hunks)
📝 Walkthrough

Walkthrough

The changes update the WebKnossos changelog and user interface to highlight that imported datasets are private by default. A new component, dataPrivacyInfo, is added and integrated into the dataset upload view, specifically passed as the subtitle of the CardContainer component. The modifications include updating import statements and enhancing component properties without altering underlying functionality.

Changes

File(s) Change Summary
CHANGELOG.unreleased.md Added a new entry under the "Added" section clarifying that imported data is private by default.
frontend/javascripts/admin/dataset/..._view.tsx In dataset_upload_view.tsx, added a new exported constant dataPrivacyInfo; in dataset_add_remote_view.tsx, imported dataPrivacyInfo and passed it as a subtitle to CardContainer.
frontend/javascripts/admin/dataset/dataset_components.tsx Updated the CardContainer component to include an optional subtitle prop and conditionally render it alongside the title.

Assessment against linked issues

Objective ([#8317]) Addressed Explanation
Add note that uploaded data is private

Possibly related PRs

Suggested labels

documentation, usability

Suggested reviewers

  • hotzenklotz

Poem

In the field of code I hop with glee,
Bringing privacy notes for all to see.
Lines of logic, clear and bright,
Making uploads secure and right.
With every change, my heart does sing—
A rabbit’s joy in every little thing!
🐰✨


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.

@knollengewaechs knollengewaechs marked this pull request as ready for review February 1, 2025 15:15
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: 0

🧹 Nitpick comments (1)
frontend/javascripts/admin/dataset/dataset_components.tsx (1)

1-1: Remove unused imports.

The following imports are not used in the code:

  • WarningOutlined from @ant-design/icons
  • PRIMARY_COLOR from oxalis/constants
  • Link from react-router-dom

Apply this diff to remove the unused imports:

-import { WarningOutlined } from "@ant-design/icons";
import { Card, Form, type FormInstance, Input, Select, Space } from "antd";
import { FormItemWithInfo } from "dashboard/dataset/helper_components";
import TeamSelectionComponent from "dashboard/dataset/team_selection_component";
import features from "features";
import messages from "messages";
-import { PRIMARY_COLOR } from "oxalis/constants";
import type * as React from "react";
-import { Link } from "react-router-dom";

Also applies to: 7-7, 9-9

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a723fcd and 33fa762.

📒 Files selected for processing (4)
  • CHANGELOG.unreleased.md (1 hunks)
  • frontend/javascripts/admin/dataset/dataset_add_remote_view.tsx (2 hunks)
  • frontend/javascripts/admin/dataset/dataset_components.tsx (3 hunks)
  • frontend/javascripts/admin/dataset/dataset_upload_view.tsx (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • frontend/javascripts/admin/dataset/dataset_add_remote_view.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: circleci_build
🔇 Additional comments (4)
frontend/javascripts/admin/dataset/dataset_components.tsx (1)

Line range hint 14-43: LGTM! Clean implementation of the subtitle prop.

The CardContainer component has been updated to support an optional subtitle prop with proper TypeScript typing and clean rendering implementation.

frontend/javascripts/admin/dataset/dataset_upload_view.tsx (2)

184-194: LGTM! Well-structured privacy info component.

The dataPrivacyInfo component is well-implemented with:

  • Clear and concise messaging
  • Proper use of Space component for layout
  • Semantic link to documentation

723-723: LGTM! Proper integration of privacy info.

The privacy note is correctly integrated into the CardContainer component.

CHANGELOG.unreleased.md (1)

18-18: LGTM! Clear and well-formatted changelog entry.

The changelog entry is properly formatted and clearly communicates the addition of the privacy note feature.

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

🧹 Nitpick comments (2)
frontend/javascripts/admin/dataset/dataset_components.tsx (2)

7-7: Remove unused import.

The Link component from react-router-dom is imported but not used in this file.

-import { Link } from "react-router-dom";

34-41: Consider moving inline styles to a CSS module.

While the implementation is correct, consider moving the inline styles to a CSS module for better maintainability and reusability.

+// styles.module.css
+.title {
+  line-height: 10px;
+}
+
+.titleWithSubtitle {
+  margin-top: 22px;
+}
+
+.titleWithoutSubtitle {
+  margin-top: 12px;
+}
+
+.subtitle {
+  font-size: 12px;
+  margin-top: 0;
+  color: grey;
+}

// dataset_components.tsx
+import styles from './styles.module.css';

-title={
-  <>
-    <h3 style={{ lineHeight: "10px", marginTop: subtitle != null ? "22px" : "12px" }}>
-      {title}
-    </h3>
-    <span style={{ fontSize: 12, marginTop: 0, color: "grey" }}>{subtitle}</span>
-  </>
-}
+title={
+  <>
+    <h3 className={`${styles.title} ${subtitle != null ? styles.titleWithSubtitle : styles.titleWithoutSubtitle}`}>
+      {title}
+    </h3>
+    <span className={styles.subtitle}>{subtitle}</span>
+  </>
+}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 33fa762 and de31942.

📒 Files selected for processing (1)
  • frontend/javascripts/admin/dataset/dataset_components.tsx (3 hunks)
🔇 Additional comments (1)
frontend/javascripts/admin/dataset/dataset_components.tsx (1)

16-16: LGTM!

The subtitle prop is well-typed as an optional JSX.Element, which is appropriate for React elements.

Also applies to: 21-21

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.

Add note that uploaded data is private
1 participant