- Issue created by @rkoller
- ๐ฌ๐งUnited Kingdom aaron.ferris
aaron.ferris โ made their first commit to this issueโs fork.
- ๐ฌ๐งUnited Kingdom aaron.ferris
Currently both actions (Confirm/cancel) result in
$this->sectionStorage->getRedirectUrl()
Pushed a commit to the fork, which:
1. On discard confirm - redirects to node/x (with changes discarded) - same as the current behaviour.
2. On discard cancel - redirects to node/x/layout (with changes still in tact) - Merge request !70423427398: redirect a user to node/x/layout on discard cancel โ (Open) created by aaron.ferris
- ๐ฌ๐งUnited Kingdom aaron.ferris
aaron.ferris โ changed the visibility of the branch 3427398-the-functionality-of to hidden.
- ๐ฌ๐งUnited Kingdom aaron.ferris
aaron.ferris โ changed the visibility of the branch 3427398-the-functionality-of to active.
- ๐ฌ๐งUnited Kingdom aaron.ferris
aaron.ferris โ changed the visibility of the branch 3427398-the-functionality-of to hidden.
- ๐ฉ๐ชGermany rkoller Nรผrnberg, Germany
Awesome, thanks for the MR! I've manually tested and confirm that the MR provides the functionality I've suggested in the issue summary and that it feels like the right choice when actually playing around with it on an install of 11.x-dev. The only question would it be necessary to provide test(s) for this MR as well?
- Status changed to RTBC
8 months ago 4:22am 15 March 2024 - ๐ฎ๐ณIndia adwivedi008
Manually Tested the MR and confirm that it resolved the issues regarding the Cancel and Confirm button functionality so RTBC+ From my side.
Changing the issue's status to RTBC, so that other people can also review and provide their suggestions.
As mentioned by @rkoller not very sure about the test coverage. - ๐ฌ๐งUnited Kingdom aaron.ferris
I checked the test coverage, unless im missing something (could well be) there is no coverage for the actual destination of these buttons.
There's this:
// Make and then discard changes. $this->assertModifiedLayout(static::FIELD_UI_PREFIX . '/display/default/layout'); $page->pressButton('Discard changes'); $page->pressButton('Confirm'); $assert_session->pageTextNotContains('You have unsaved changes.');
Also some bits and pieces around Discard->confirm, but not cancel.
- Status changed to Needs work
8 months ago 11:55pm 17 March 2024 - ๐ณ๐ฟNew Zealand danielveza Brisbane, AU
Setting back to NW for test coverage.
If there is no coverage for the cancel button at the moment, IMO we need a test in
LayoutBuilderUiTest
that does the following:- Go to the default layout
- Update the default layout, add a section & a block
- Press the discard button
- Press the cancel button
- Assert the newly added section & block are still there
- Assert the address is the layout builder edit screen
- ๐ฌ๐งUnited Kingdom aaron.ferris
Ive pushed an initial go at the test for this, it follows a similar approach to
testUnsavedChangesMessage
Will this suffice? Suggestions welcome.
- Status changed to Needs review
8 months ago 4:06pm 1 April 2024 - Status changed to Needs work
8 months ago 7:42pm 1 April 2024 - ๐ฌ๐งUnited Kingdom aaron.ferris
Thanks @smustgrave - committed your suggestion and rebased. Back for review.
- Status changed to Needs review
8 months ago 9:00am 2 April 2024 - Assigned to dishakatariya
- ๐ฎ๐ณIndia dishakatariya
Hi, Can someone please add the propr screenshots of this issue? so that i can be able to reproduce it properly.
Followed the given steps but changes are already looking fine to me as expected.
Thanks. - Issue was unassigned.
- ๐ฌ๐งUnited Kingdom aaron.ferris
Hello @DishaKatariya
Ive added some screenshots that will hopefully help
Thanks
Aaron - ๐ณ๐ฟNew Zealand danielveza Brisbane, AU
I added a couple of thoughts to the MR. Nothing I feel super strongly about so leaving the status the same
- ๐ฎ๐ณIndia sdhruvi5142
Hi, I've verified and tested MR! 7042 and applied patch successfully on 11.x Version the changes are working as expected.
Following steps I followed:
1. Open local and Go to /admin/structure/types/manage/article/display/default
2. Activate Layout Builder
3. Change the order of the default blocks to Tags, Body, Image, Comments
4. Click the Discard changes button
5. Click confirm
6. Reapply the changes to the block order for the layout
7. Click the Discard changes button again
8. Click the Cancel button
9. Observed the changes hereTesting Result:
After changing the orders of the default blocks and click on Discard changes button > Clicked on Cancel button and user was redirected back to the page of the layout so the user is able to continue with the already made changes. Hence the changes are working as expected.Attaching the videos for reference.
Hence moving to RTBC!
Thanks - Status changed to RTBC
8 months ago 1:38pm 4 April 2024 - Status changed to Needs work
7 months ago 1:04pm 5 April 2024 - ๐ณ๐ฟNew Zealand quietone
@sdhruvi5142, thank you for the manual testing.
There are unresolved threads in the MR about the testing. This also should have a title that reflects what is being fixed.
- First commit to issue fork.
- Status changed to Needs review
7 months ago 1:16pm 5 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I've incorporated the new test into an existing test around the same functionality - which was missing a test of the cancel functionality.
- Status changed to RTBC
7 months ago 1:07am 6 April 2024 - ๐บ๐ธUnited States smustgrave
Couldn't run test-only feature due to gitlab roles so ran locally
Behat\Mink\Exception\ExpectationException : Current page is "/admin/structure/types/manage/bundle_with_section_field/display/default", but "/admin/structure/types/manage/bundle_with_section_field/display/default/layout" expected.
Can confirm applying the MR that discarding changes takes me back to the layout builder.
Believe this change is good to go, title also reflects what is happening now.
- Status changed to Fixed
7 months ago 11:49am 6 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Committed and pushed 8c50a65a7d to 11.x and 828a3c56df to 10.3.x and eb9a102582 to 10.2.x. Thanks!
-
alexpott โ
committed eb9a1025 on 10.2.x
Issue #3427398 by aaron.ferris, alexpott, sdhruvi5142, rkoller,...
-
alexpott โ
committed eb9a1025 on 10.2.x
-
alexpott โ
committed 828a3c56 on 10.3.x
Issue #3427398 by aaron.ferris, alexpott, sdhruvi5142, rkoller,...
-
alexpott โ
committed 828a3c56 on 10.3.x
-
alexpott โ
committed 8c50a65a on 11.x
Issue #3427398 by aaron.ferris, alexpott, sdhruvi5142, rkoller,...
-
alexpott โ
committed 8c50a65a on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.