Skip to content

Add edit DataDoc frontend - #48270

Merged
TurnerRiley merged 6 commits into
stagingfrom
edit-data-doc-frontend
Oct 5, 2022
Merged

Add edit DataDoc frontend#48270
TurnerRiley merged 6 commits into
stagingfrom
edit-data-doc-frontend

Conversation

@TurnerRiley

@TurnerRiley TurnerRiley commented Sep 23, 2022

Copy link
Copy Markdown
Contributor

@megcrenshaw and I paired on this PR.

This is part of this Jira ticket for adding an editing interface for existing DataDocs (to be able to change the name and content of them). This PR now adds the frontend content with the editing form itself in continuation of the backend PR. The data doc editing form is visually very similar to the new data doc form, but the key/slug cannot be changed.

To see functionality:

  1. Go to http://localhost-studio.code.org:3000/data_docs/new (it should make you add Levelbuilder permissions to your local account before you can view the page)
  2. Create a new DataDoc
  3. Go to http://localhost-studio.code.org:3000/data_docs/{the_slug_name_you_made}/edit to see the editor
  4. Make changes to the doc name and/or the content
  5. If you click 'Save and Keep Editing', your changes will be saved but you'll stay on the page. If you click 'Save and Close', your changes will be saved and you'll be redirected to the doc.

Links

Jira ticket: here
Spec: requirement #2 here
Backend PR: here

Testing story

Local testing to run through creating, editing, and submitting changes to a data doc. Frontend tests were also added for these changes.

Follow-up work

Continuing work on the other requirements in the spec.

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@TurnerRiley
TurnerRiley requested a review from a team September 23, 2022 22:17
Comment thread apps/src/lib/levelbuilder/data-docs-editor/DataDocFormEditor.jsx Outdated
Comment thread apps/src/lib/levelbuilder/data-docs-editor/DataDocFormEditor.jsx
@davidsbailey

Copy link
Copy Markdown
Member

I noticed an issue which seems with investigating -- when I create a dataset named waterfalls, and then I view it, I see a 404 trying to load this image in the network tab: http://localhost-studio.code.org:3000/shared/images/fill-70x70/courses/logo_waterfalls.png

doesn't necessarily need to be fixed in this PR, but it would be nice to have a Jira item for this if you are not going to look at it now.

Base automatically changed from edit-data-doc-backend to staging September 26, 2022 18:41
@TurnerRiley

Copy link
Copy Markdown
Contributor Author

I noticed an issue which seems with investigating -- when I create a dataset named waterfalls, and then I view it, I see a 404 trying to load this image in the network tab: http://localhost-studio.code.org:3000/shared/images/fill-70x70/courses/logo_waterfalls.png

doesn't necessarily need to be fixed in this PR, but it would be nice to have a Jira item for this if you are not going to look at it now.

@megcrenshaw and I paired on this and were unable to figure it out. It is not specific to data docs and appears elsewhere in other editors such as the reference guide editor. I've created a Jira task for it!

@TurnerRiley
TurnerRiley requested a review from a team September 28, 2022 22:38
@davidsbailey
davidsbailey self-requested a review October 4, 2022 18:57

@davidsbailey davidsbailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks great @TurnerRiley ! Sorry for the delay.

server.restore();
utils.navigateToHref.restore();
});
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great tests!

@TurnerRiley
TurnerRiley merged commit 9979c38 into staging Oct 5, 2022
@TurnerRiley
TurnerRiley deleted the edit-data-doc-frontend branch October 5, 2022 17:06
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