TouK / nussknacker

Low-code tool for automating actions on real time data | Stream processing for the users.
https://nussknacker.io
Apache License 2.0
664 stars 93 forks source link

[Draft] Sticky notes #7149

Closed philemone closed 1 week ago

philemone commented 1 week ago

Describe your changes

This is just a draft with stickyNotes functionality added

Checklist before merge

Summary by CodeRabbit

Release Notes

github-actions[bot] commented 1 week ago

created: #7179 :warning: Be careful! Snapshot changes are not necessarily the cause of the error. Check the logs.

bartektartanus commented 1 week ago

@coderabbitai review

coderabbitai[bot] commented 1 week ago
:white_check_mark: Actions performed Review triggered. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
coderabbitai[bot] commented 1 week ago

[!IMPORTANT]

Review skipped

Draft detected.

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

The changes in this pull request introduce a comprehensive sticky notes feature within the application. This includes new action types, Redux actions for managing sticky notes, and modifications to various components for rendering and interacting with sticky notes. Additionally, a new API service is implemented for CRUD operations on sticky notes, along with corresponding database migrations and repository definitions. The UI is updated to include a sticky notes panel in the toolbar, enhancing user interaction. Overall, the changes significantly expand the application's capabilities regarding sticky notes.

Changes

File Change Summary
designer/client/src/actions/actionTypes.ts Added new action types: "STICKY_NOTES_UPDATED" and "STICKY_NOTE_DELETED".
designer/client/src/actions/nk/process.ts Introduced functions for sticky note management: fetchStickyNotesForScenario, stickyNoteUpdated, stickyNoteDeleted, and stickyNoteAdded. Updated control flow to use flushSync for state updates.
designer/client/src/assets/json/nodeAttributes.json Added new entry for "StickyNote" with a name property.
designer/client/src/common/StickyNote.ts Defined new Dimensions type and StickyNote interface for sticky notes.
designer/client/src/components/ComponentPreview.tsx Implemented conditional rendering for StickyNotePreview based on node type.
designer/client/src/components/StickyNotePreview.tsx Created a new component for rendering sticky note previews with dynamic styles.
designer/client/src/components/graph/EspNode/stickyNote.ts Enhanced sticky note shape management with new constants and rendering logic using the JointJS library.
designer/client/src/components/graph/EspNode/stickyNoteElements.ts Added functionality for creating and managing sticky note elements in the graph.
designer/client/src/components/graph/Graph.tsx Updated to manage sticky notes, including new methods for adding, updating, and deleting sticky notes.
designer/client/src/components/graph/GraphPartialsInTS/applyCellChanges.ts Modified to handle sticky notes in the graph's cell changes.
designer/client/src/components/graph/GraphPartialsInTS/cellUtils.ts Added utility functions for identifying and copying sticky note elements.
designer/client/src/components/graph/ProcessGraph.tsx Enhanced to manage sticky notes in the graph's state and actions.
designer/client/src/components/graph/fragmentGraph.tsx Updated to include stickyNotes in props for the FragmentGraphPreview component.
designer/client/src/components/graph/node-modal/node/FragmentContent.tsx Integrated stickyNotes state into the fragment content rendering.
designer/client/src/components/graph/types.ts Expanded ScenarioGraphProps and FragmentGraphProps to include sticky notes.
designer/client/src/components/stickyNotes/StickyNotesPanel.tsx Created a panel component for sticky notes in the toolbar.
designer/client/src/components/toolbarSettings/TOOLBAR_COMPONENTS_MAP.ts Added StickyNotesPanel to the toolbar components map.
designer/client/src/components/toolbarSettings/defaultToolbarsConfig.ts Included sticky-notes-panel in the default toolbar configuration.
designer/client/src/components/toolbars/creator/ComponentIcon.tsx Introduced getStickyNoteIcon function for sticky note icons.
designer/client/src/http/HttpService.ts Added methods for managing sticky notes: addStickyNote, deleteStickyNote, updateStickyNote, and getStickyNotes.
designer/client/src/reducers/graph/reducer.ts Updated reducer to handle new sticky notes actions.
designer/client/src/reducers/graph/types.ts Modified GraphState to include an array of StickyNote objects.
designer/client/src/reducers/graph/utils.ts Added utility functions for managing sticky notes in layouts.
designer/client/src/reducers/selectors/graph.ts Created a selector for retrieving sticky notes from the graph state.
designer/client/src/types/node.ts Updated Type definition to include StickyNoteType.
designer/client/src/types/stickyNote.ts Defined StickyNoteType constant and createStickyNoteId function.
designer/server/src/main/resources/defaultDesignerConfig.conf Updated configuration to include sticky note settings and toolbar entries.
designer/server/src/main/scala/db/migration/V1_060__CreateStickyNotesDefinition.scala Created migration for sticky notes database schema.
designer/server/src/main/scala/pl/touk/nussknacker/ui/api/StickyNotesApiHttpService.scala Implemented RESTful API service for sticky notes management.
designer/server/src/main/scala/pl/touk/nussknacker/ui/api/description/StickyNotesApiEndpoints.scala Defined API endpoints for sticky notes operations.
designer/server/src/main/scala/pl/touk/nussknacker/ui/api/description/stickynotes/Dtos.scala Introduced DTOs for sticky notes management.
designer/server/src/test/scala/pl/touk/nussknacker/ui/api/StickyNotesApiHttpServiceBusinessSpec.scala Added tests for sticky notes API functionality.
docs-internal/api/nu-designer-openapi.yaml Updated API documentation with new sticky notes endpoints.

Poem

In the garden of notes, where ideas bloom,
Sticky notes flutter, dispelling the gloom.
With colors and shapes, they dance in delight,
A canvas of thoughts, both day and night.
So let us rejoice, with each note we create,
A world full of wonders, oh, isn't it great! 🐇✨


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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , 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 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
philemone commented 1 week ago

@coderabbitai - could you check my recent changes and close your comments that you think were resolved?

coderabbitai[bot] commented 1 week ago

@philemone: I've reviewed your recent changes and will resolve the comments that have been addressed. Great work!


If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit!

:white_check_mark: Actions performed Comments resolved.
philemone commented 1 week ago

@coderabbitai review newest changes

coderabbitai[bot] commented 1 week ago

@philemone: I will review the newest changes.

:white_check_mark: Actions performed Review triggered. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
coderabbitai[bot] commented 1 week ago

@philemone: I will review the newest changes.

:white_check_mark: Actions performed Review triggered. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
philemone commented 1 week ago

@coderabbitai can you close comments which you think have been resolved by my recent changes and do a review one more time?

coderabbitai[bot] commented 1 week ago

@philemone: I've closed the comments that have been resolved by your recent changes and will review the updated code.

:white_check_mark: Actions performed Comments resolved. --- Review triggered. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.