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

557 history notes tab update important note #2549

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ellohez
Copy link
Contributor

@ellohez ellohez commented Feb 19, 2025

Trello card

The changes have added an Update Important Note function with button, to the side bar, visible from the History and Notes tab

Scenario View
User visits the History and notes tab on an Artefact, the Update Important Note button is present, also on display is a present Important Note on the document which is always visible regardless of which tab the user is on. Edition with important note and  update important note button visible
User clicks on Update Important Note button, the page populates the editing textbox with the existing note inside present to adjust or remove. Update important note screen with note present
User clears the important note in the edit textbox and clicks save. The message informs the user this has been successful, the note has been cleared, so an important note is no longer visible on the page. Important note cleared and emptied textbox saved
User edits the existing note or enters new text into the textbox and clicks save. The message informs the user that this has been successfully saved. Important note edited and saved

@ellohez ellohez force-pushed the 557-History-notes-tab_Update-important-note branch 2 times, most recently from 85e4582 to 240afb4 Compare February 20, 2025 15:05
@PeterHattyar PeterHattyar force-pushed the 557-History-notes-tab_Update-important-note branch 4 times, most recently from 2ffc796 to 2fe01ec Compare February 25, 2025 12:01
@PeterHattyar PeterHattyar marked this pull request as ready for review February 25, 2025 12:21
Each edition can have only one important note at a time.</p>

<%= form_for(:note, :url=> notes_path) do |f| %>
<%= hidden_field_tag :edition_id, resource.id %>
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be consistent and use @edition here.

Suggested change
<%= hidden_field_tag :edition_id, resource.id %>
<%= hidden_field_tag :edition_id, @edition.id %>

Copy link
Contributor

@mtaylorgds mtaylorgds left a comment

Choose a reason for hiding this comment

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

Nice work, just a couple of very minor comments.

- Add cancel link and important note information.
- Add hidden field tag for note type.
- Conditionally render _important_note partial if note exists
- Include original important note text in update important note text area
@ellohez ellohez force-pushed the 557-History-notes-tab_Update-important-note branch 2 times, most recently from d9b18b9 to 611dde3 Compare February 26, 2025 14:21
- Handle blank important note saving, whether an important note is present.
- Tests for New Edition and Edition History functionality are in place. These will have to be un-skipped in the future, when the functionality is ready.
- Refactor for PR comments
@ellohez ellohez force-pushed the 557-History-notes-tab_Update-important-note branch from 611dde3 to 536c63f Compare February 26, 2025 16:28
@ellohez ellohez marked this pull request as draft February 27, 2025 14:40
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