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

Merged
merged 4 commits into from
Mar 5, 2025

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
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.

@ellohez ellohez force-pushed the 557-History-notes-tab_Update-important-note branch 3 times, most recently from 611dde3 to 536c63f Compare February 26, 2025 16:28
@ellohez ellohez marked this pull request as draft February 27, 2025 14:40
@ellohez ellohez force-pushed the 557-History-notes-tab_Update-important-note branch 2 times, most recently from 7a579c3 to c973571 Compare March 3, 2025 14:46
@ellohez ellohez marked this pull request as ready for review March 3, 2025 14:55
visit edition_path(@draft_edition)

assert page.has_text?("Important")
assert page.has_text?(note_text)
Copy link
Contributor

@davidtrussler davidtrussler Mar 4, 2025

Choose a reason for hiding this comment

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

Is it worth adding a test that these two text elements are within a banner (and likewise below)?
So maybe

within :css, ".govuk-notification-banner" do
  assert page.has_text?("Important")
  assert page.has_text?(note_text)
end

@ellohez ellohez force-pushed the 557-History-notes-tab_Update-important-note branch 4 times, most recently from c84d3bd to 2fc0290 Compare March 4, 2025 12:59
Copy link
Contributor

@davidtrussler davidtrussler 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 - LGTM! 👍

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.

Minor assertion tweak suggestion

ellohez and others added 2 commits March 5, 2025 10:36
- 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
- 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 2fc0290 to 6b7f1ea Compare March 5, 2025 11:25
@PeterHattyar PeterHattyar force-pushed the 557-History-notes-tab_Update-important-note branch from 6b7f1ea to 9b0c980 Compare March 5, 2025 12:31
@ellohez ellohez merged commit 82f1692 into main Mar 5, 2025
12 checks passed
@ellohez ellohez deleted the 557-History-notes-tab_Update-important-note branch March 5, 2025 14:18
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.

4 participants