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

TNO-2056 Update Report content editing #1478

Merged
merged 1 commit into from
Feb 1, 2024
Merged

TNO-2056 Update Report content editing #1478

merged 1 commit into from
Feb 1, 2024

Conversation

Fosol
Copy link
Collaborator

@Fosol Fosol commented Feb 1, 2024

Refactor report editing forms to resolve the WYSIWYG component performance issues.

Report Edit Form

image

@Fosol Fosol added bug Something isn't working subscriber PR contains changes towards the subscriber application, labels Feb 1, 2024
@Fosol Fosol self-assigned this Feb 1, 2024
@@ -123,118 +110,6 @@ export const ReportEdit: React.FC = () => {
} catch {}
});

const handleExport = React.useCallback(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved all this logic to a separate component ReportEditForm. This new component is the report editor with the tabs.

@@ -0,0 +1,201 @@
import { Button } from 'components/button';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New component which is the right column for editing one content item at a time.

@@ -1,32 +1,53 @@
import { Action } from 'components/action';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated component is the left column of the report editor.

@@ -216,6 +223,9 @@ export const ReportSectionContent: React.FC<IReportSectionContentProps> = ({

return (
<div
className={`${isSame ? 'active-content ' : ''}${
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Highlight active row(s). Duplicate content can be in more than one section.

@Fosol Fosol marked this pull request as draft February 1, 2024 15:45
@Fosol Fosol marked this pull request as ready for review February 1, 2024 17:14
@@ -127,6 +127,8 @@ public override ReportInstance Update(ReportInstance entity)
});
entity.ContentManyToMany.ForEach(ric =>
{
// Duplicate content can be in multiple sections, so we grab the first copy.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixing issue where saving a report fails if the edited content is in more than one section.

@Fosol Fosol merged commit 0eceb8d into bcgov:dev Feb 1, 2024
2 checks passed
@Fosol Fosol deleted the tno-2056 branch February 1, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working subscriber PR contains changes towards the subscriber application,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant