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

[connections] - feat: datasource request flow #6678

Merged
merged 9 commits into from
Aug 6, 2024

Conversation

JulesBelveze
Copy link
Contributor

@JulesBelveze JulesBelveze commented Aug 6, 2024

Description

This PR implements a new data source request flow, introducing a RequestDataSourcesModal component.

The main changes include:

  • A new RequestDataSourcesModal component that allows users to request access to data sources they don't currently have permissions for.
  • Enhancement of the sendEmail function to support cc recipients, enabling the inclusion of data source administrators in request emails.
  • Integration of the new request flow in the data sources management page.
  • Updates to the data source selection UI in the assistant builder to accommodate the new request flow.

New look:

Screenshot 2024-08-06 at 12 02 17 Screenshot 2024-08-06 at 12 02 28

References:

Risk

Breaking UX changes

Deploy Plan

  • Deploy tofront-edge
  • Deploy front

Jules added 5 commits August 6, 2024 10:52
 - Added a new modal component to request data sources within the app
 - The modal includes a dropdown to select the data hosting platform based on available data source integrations

[managed] - refactor: adjust DataSourceIntegration and ManagedConnector types usage

 - Exported DataSourceIntegration type for reuse across components
 - Defined a new ManagedConnector type to replace inline type definitions
 - Replaced `editedByUser` string field with a more detailed object of type `EditedByUser`

[types] - refactor: change EditedByUser from interface to type

 - Promoted consistency in type definitions across the codebase by converting EditedByUser to a type
 - Added an optional cc parameter to include CC recipients when sending emails
 - Updated logging to include the cc field when an email is sent or if there is an error sending it
…ality in RequestDataSourcesModal

 - Add a function to send emails to request data source integrations from the RequestDataSourcesModal component
 - Use the newly added email key from the EditedByUser type to populate the ccEmail field for the email

[front/lib/resources/data_source_resource] - feature: extend EditedByUser to include email

 - Add the email field to the EditedByUser type to facilitate communication features like sending emails

[front/pages/w] - feature: pass user email to RequestDataSourcesModal

 - Include the current user's email in server-side props to allow it to be used when sending emails through the modal
 - Remove unused console.log and commented code for a cleaner codebase

[types] - feature: add email field to EditedByUser type definition

 - Extend the EditedByUser type to include an optional email field to support new email-related functionalities
…al improvements

 - Add a "Request" button on the data sources page to open the request data source modal
 - Set width property for the dropdown menu items in the request data sources modal
 - Remove size property from a button inside the request data sources modal for consistency
 - Ensure the 'RequestDataSourcesModal' state reflects the actual visibility of the modal
 - Updated sendRequestDataSourceEmail to allow optional ccEmail parameter
 - Prevent sending a cc if ccEmail is undefined when requesting a new data source
Jules added 4 commits August 6, 2024 12:27
…cesModal

 - Reset message input field when the modal is closed
 - Clear the selection of data source integration upon modal closure
…ations and error handling

 - Integrate SendNotificationsContext to enable notification alerts on email sending status
 - Include error handling with logging when email sending fails
 - Modify sendRequestDataSourceEmail function to return result instead of awaiting it
 - Ensure missing userEmail is handled and reports an error notification
…s and improve modal reset

 - Modify email subject to include dataSourceName for clarity on request content
 - Refactor sendEmail function to simplify CC logic and unify code paths
 - Enhance RequestDataSourcesModal onClose to reset message and selectedDataSourceIntegration state
 - Add guard to prevent email sending if selectedDataSourceIntegration is not set
 - Improve logging for sendEmail function to include subject field for better traceability
…d sending logic

 - Change email content type from text to html for enhanced email formatting
 - Remove cc email option from `sendEmail` function and related logging information
@JulesBelveze JulesBelveze merged commit 664d826 into main Aug 6, 2024
4 checks passed
@JulesBelveze JulesBelveze deleted the feat/datasource-request-flow branch August 6, 2024 12:35
JulesBelveze added a commit that referenced this pull request Aug 6, 2024
JulesBelveze added a commit that referenced this pull request Aug 6, 2024
currentUserEmail: string;
};

async function sendRequestDataSourceEmail(
Copy link
Contributor

Choose a reason for hiding this comment

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

This part should live gated behind a backend endpoint 🙏. Also we should use sendgrid with the template to send email now.

flvndvd pushed a commit that referenced this pull request Aug 8, 2024
* [data_source] - feature: implement RequestDataSourcesModal component

 - Added a new modal component to request data sources within the app
 - The modal includes a dropdown to select the data hosting platform based on available data source integrations

[managed] - refactor: adjust DataSourceIntegration and ManagedConnector types usage

 - Exported DataSourceIntegration type for reuse across components
 - Defined a new ManagedConnector type to replace inline type definitions
 - Replaced `editedByUser` string field with a more detailed object of type `EditedByUser`

[types] - refactor: change EditedByUser from interface to type

 - Promoted consistency in type definitions across the codebase by converting EditedByUser to a type

* [front] - feature: support cc field in sendEmail function

 - Added an optional cc parameter to include CC recipients when sending emails
 - Updated logging to include the cc field when an email is sent or if there is an error sending it

* [front/components/data_source] - feature: implement emailing functionality in RequestDataSourcesModal

 - Add a function to send emails to request data source integrations from the RequestDataSourcesModal component
 - Use the newly added email key from the EditedByUser type to populate the ccEmail field for the email

[front/lib/resources/data_source_resource] - feature: extend EditedByUser to include email

 - Add the email field to the EditedByUser type to facilitate communication features like sending emails

[front/pages/w] - feature: pass user email to RequestDataSourcesModal

 - Include the current user's email in server-side props to allow it to be used when sending emails through the modal
 - Remove unused console.log and commented code for a cleaner codebase

[types] - feature: add email field to EditedByUser type definition

 - Extend the EditedByUser type to include an optional email field to support new email-related functionalities

* [data_source] - feature: introduce data source request button and modal improvements

 - Add a "Request" button on the data sources page to open the request data source modal
 - Set width property for the dropdown menu items in the request data sources modal
 - Remove size property from a button inside the request data sources modal for consistency
 - Ensure the 'RequestDataSourcesModal' state reflects the actual visibility of the modal

* [front] - fix: make ccEmail optional in request data source email

 - Updated sendRequestDataSourceEmail to allow optional ccEmail parameter
 - Prevent sending a cc if ccEmail is undefined when requesting a new data source

* [front] - fix: clear form and selection after closing RequestDataSourcesModal

 - Reset message input field when the modal is closed
 - Clear the selection of data source integration upon modal closure

* [data_source] - feature: enhance RequestDataSourcesModal with notifications and error handling

 - Integrate SendNotificationsContext to enable notification alerts on email sending status
 - Include error handling with logging when email sending fails
 - Modify sendRequestDataSourceEmail function to return result instead of awaiting it
 - Ensure missing userEmail is handled and reports an error notification

* [data_source] - refactor: streamline request data source email process and improve modal reset

 - Modify email subject to include dataSourceName for clarity on request content
 - Refactor sendEmail function to simplify CC logic and unify code paths
 - Enhance RequestDataSourcesModal onClose to reset message and selectedDataSourceIntegration state
 - Add guard to prevent email sending if selectedDataSourceIntegration is not set
 - Improve logging for sendEmail function to include subject field for better traceability

* [data_source] - refactor: update request data source email content and sending logic

 - Change email content type from text to html for enhanced email formatting
 - Remove cc email option from `sendEmail` function and related logging information

---------

Co-authored-by: Jules <jules@MacBook-Pro.local>
flvndvd pushed a commit that referenced this pull request Aug 8, 2024
albandum pushed a commit that referenced this pull request Aug 28, 2024
* [data_source] - feature: implement RequestDataSourcesModal component

 - Added a new modal component to request data sources within the app
 - The modal includes a dropdown to select the data hosting platform based on available data source integrations

[managed] - refactor: adjust DataSourceIntegration and ManagedConnector types usage

 - Exported DataSourceIntegration type for reuse across components
 - Defined a new ManagedConnector type to replace inline type definitions
 - Replaced `editedByUser` string field with a more detailed object of type `EditedByUser`

[types] - refactor: change EditedByUser from interface to type

 - Promoted consistency in type definitions across the codebase by converting EditedByUser to a type

* [front] - feature: support cc field in sendEmail function

 - Added an optional cc parameter to include CC recipients when sending emails
 - Updated logging to include the cc field when an email is sent or if there is an error sending it

* [front/components/data_source] - feature: implement emailing functionality in RequestDataSourcesModal

 - Add a function to send emails to request data source integrations from the RequestDataSourcesModal component
 - Use the newly added email key from the EditedByUser type to populate the ccEmail field for the email

[front/lib/resources/data_source_resource] - feature: extend EditedByUser to include email

 - Add the email field to the EditedByUser type to facilitate communication features like sending emails

[front/pages/w] - feature: pass user email to RequestDataSourcesModal

 - Include the current user's email in server-side props to allow it to be used when sending emails through the modal
 - Remove unused console.log and commented code for a cleaner codebase

[types] - feature: add email field to EditedByUser type definition

 - Extend the EditedByUser type to include an optional email field to support new email-related functionalities

* [data_source] - feature: introduce data source request button and modal improvements

 - Add a "Request" button on the data sources page to open the request data source modal
 - Set width property for the dropdown menu items in the request data sources modal
 - Remove size property from a button inside the request data sources modal for consistency
 - Ensure the 'RequestDataSourcesModal' state reflects the actual visibility of the modal

* [front] - fix: make ccEmail optional in request data source email

 - Updated sendRequestDataSourceEmail to allow optional ccEmail parameter
 - Prevent sending a cc if ccEmail is undefined when requesting a new data source

* [front] - fix: clear form and selection after closing RequestDataSourcesModal

 - Reset message input field when the modal is closed
 - Clear the selection of data source integration upon modal closure

* [data_source] - feature: enhance RequestDataSourcesModal with notifications and error handling

 - Integrate SendNotificationsContext to enable notification alerts on email sending status
 - Include error handling with logging when email sending fails
 - Modify sendRequestDataSourceEmail function to return result instead of awaiting it
 - Ensure missing userEmail is handled and reports an error notification

* [data_source] - refactor: streamline request data source email process and improve modal reset

 - Modify email subject to include dataSourceName for clarity on request content
 - Refactor sendEmail function to simplify CC logic and unify code paths
 - Enhance RequestDataSourcesModal onClose to reset message and selectedDataSourceIntegration state
 - Add guard to prevent email sending if selectedDataSourceIntegration is not set
 - Improve logging for sendEmail function to include subject field for better traceability

* [data_source] - refactor: update request data source email content and sending logic

 - Change email content type from text to html for enhanced email formatting
 - Remove cc email option from `sendEmail` function and related logging information

---------

Co-authored-by: Jules <jules@MacBook-Pro.local>
albandum pushed a commit that referenced this pull request Aug 28, 2024
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.

3 participants