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

feat: rename flows on main page and by clicking header #5525

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

Conversation

lucaseduoli
Copy link
Collaborator

This pull request introduces several enhancements and new features to the flow management components in the frontend. The key changes include the addition of an inline flow name editing feature, improvements to the flow settings modal, and updates to the dropdown component to support editing flow details.

Inline Flow Name Editing:

  • Added state and handlers for editing the flow name inline within the MenuBar component. This includes the use of useEffect, useState, useRef, and event handlers for input changes and key events. (src/frontend/src/components/core/appHeaderComponent/components/FlowMenu/index.tsx) [1] [2] [3] [4] [5] [6] [7] [8]

Flow Settings Modal Enhancements:

  • Modified the FlowSettingsModal component to accept flowData as a prop and updated the state initialization and handlers to use this prop. This allows the modal to be reused with different flow data. (src/frontend/src/modals/flowSettingsModal/index.tsx) [1] [2]

Dropdown Component Updates:

  • Added a new handleEdit prop to the DropdownComponent and updated the useSelectOptionsChange hook to handle the "edit" action. This enables the dropdown menu to trigger the flow settings modal for editing flow details. (src/frontend/src/pages/MainPage/components/dropdown/index.tsx, src/frontend/src/pages/MainPage/hooks/use-select-options-change.tsx) [1] [2] [3] [4] [5]

Integration with Grid and List Components:

  • Integrated the flow settings modal and the edit functionality into the GridComponent and ListComponent. This includes adding state for the modal and passing the handleEdit function to the dropdown component. (src/frontend/src/pages/MainPage/components/grid/index.tsx, src/frontend/src/pages/MainPage/components/list/index.tsx) [1] [2] [3] [4] [5] [6] [7] [8]

Type Definitions:

  • Updated the FlowSettingsPropsType to include an optional flowData property, allowing the flow settings modal to be more flexible. (src/frontend/src/types/components/index.ts)

@lucaseduoli lucaseduoli self-assigned this Jan 2, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request javascript Pull requests that update Javascript code labels Jan 2, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 2, 2025
Copy link
Member

@Cristhianzl Cristhianzl left a comment

Choose a reason for hiding this comment

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

Can we add tests to validate this change?
I think It can be on core tests > extended > features

Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

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

image clicking header name makes the name disapper but the / keeps in place. image image Flow settings and edit details open the same modal but have different name and icons

Edit component should not have endpoint name avaliable:
image

lucaseduoli and others added 3 commits January 3, 2025 16:00
…/FlowMenu/index.tsx

Co-authored-by: Cristhian Zanforlin Lousa <[email protected]>
…/FlowMenu/index.tsx

Co-authored-by: Cristhian Zanforlin Lousa <[email protected]>
…/FlowMenu/index.tsx

Co-authored-by: Cristhian Zanforlin Lousa <[email protected]>
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 3, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants