Repository navigation
Open the log form with every site when "All sites" was chosen - #146
Merged
Merged
Conversation
Reported as an unnecessary second step, and it is a bug. The "All sites" row at the foot of the site panel on the overview exists for one reason, written into its own comment when it was built in ArunNGun#119: to hand the full body map over to the form, for the sites a protocol has not pinned. It opened the form restricted to the pinned ones, so the next thing anybody did was press "Inject somewhere else" to undo it. The row did what the Details button does, set the compound and open the form, and the form resets to the pinned list every time it opens. It had no way to know why it was opened, and nothing told it. So it is told. LogDoseSheet takes anySite, which switches the pinned restriction off once the form has filled itself in, after applyProtocol rather than before, since that is what puts the pinned list back. The overview sets it only from the "All sites" row and clears it on close, so no other way in ever inherits it. Details and every other entry point keep the pinned list, which is where rotation by plan belongs.
|
Someone is attempting to deploy a commit to the Arun's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported as an unnecessary second step, and it is a bug.
The All sites row at the foot of the site panel on the overview exists for one reason, written into its own comment when it was built in #119: to hand the full body map over to the form, for the sites a protocol has not pinned. It opened the form restricted to the pinned ones, so the next thing anybody did was press Inject somewhere else to undo it.
Why
The row did exactly what the Details button does: set the compound and open the form. The form resets to the pinned list every time it opens. It had no way to know why it was opened, and nothing told it.
The fix
LogDoseSheettakesanySite, which switches the pinned restriction off once the form has filled itself in. It runs afterapplyProtocolrather than before, since that is the call that puts the pinned list back.The overview sets it only from the All sites row and clears it on close, so no other way in ever inherits it. Details and every other entry point keep the pinned list, which is where rotation by plan belongs.
Checks
npx tsc --noEmitclean,npx next lintclean, 1745 tests pass.