Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The hero block, used on the Home and Recipes pages, is identical across pages and causes confusion. It also could use better text for the button.
Proposed resolution
- Add a new hero block for the Recipes page
- update the text used on the buttons of each hero block to make it obvious they will link to the recipe mentioned.
Remaining tasks
none
User interface changes
- New hero block on the Recipes page
- Updated text on all hero block link buttons
API changes
none
Data model changes
none
Release notes snippet
none
Original report by Not Real
The hero block is enabled on both the home page and the recipes page. This can lead a user to thinking the page hasnt loaded when they switch from the home page to the recipes page. Personally I would only have the hero block on the home page.
See animation below to highlight the problem.
Comment | File | Size | Author |
---|---|---|---|
#44 | interdiff-42-44.txt | 444 bytes | kjay |
#44 | 3027236-44.patch | 264.83 KB | kjay |
#42 | Interdiff-3027236-36-42.txt | 2.06 KB | rachel_norfolk |
#42 | 3027236-42.patch | 280.57 KB | rachel_norfolk |
#37 | Home___Drupal.png | 483.98 KB | Eli-T |
Comments
Comment #2
babusaheb.vikas CreditAttribution: babusaheb.vikas commentedYou can configure block and remove "/recipes" from pages visibility settings.
/admin/structure/block/manage/umami_banner_recipes
OR you can update block.block.umami_banner_recipes.yml file on line No. 31 with (
pages: "<front>"
) before installation.File directory is core\profiles\demo_umami\config\optional
Comment #3
akshay_dVisibility is set to "front" page for umami_banner_recipes
Comment #4
akshay_dthe above code needs to be reviewed
Comment #6
Eli-TComment #7
Eli-TComment #8
kjay CreditAttribution: kjay commentedThis is a good point and the hero banner on home is there because the front page is not yet complete. But I would propose that we could also improve this by keeping both banners and introducing new hero banner content for the recipes landing page. I am currently working on finding a suitable image that can be used for linking to one of the recipes. I will update shortly.
Comment #9
kjay CreditAttribution: kjay commentedWe could use the attached hero banner image as a second hero banner block on the recipes landing page and link to the existing Vegan Chocolate Brownie recipe. However, this hero image relies on a related issue to update the Vegan Chocolate Brownie Recipe #2953995: Update the Umami Vegan Chocolate Brownie recipe that we need to get in at the same time for 8.7.
We can use the title and summary text of the linked recipe to overlay to the left in white text.
Attached also is a guide mockup for how this should end up looking.
Comment #10
rachel_norfolkWorking on this now as part of Global Contribution Weekend, in Leeds, UK
Comment #11
rachel_norfolkOkay - plan:
Comment #12
rachel_norfolkOkay, here we go...
Comment #13
Eli-TNB this is blocked on #2953995: Update the Umami Vegan Chocolate Brownie recipe
Comment #15
rachel_norfolkI am officially daft and forgot to run tests after changing the content!
Updating now...
Comment #16
rachel_norfolkThe test needed updating as there are now two banner blocks and the one on the recipe page is a new one, so has a new UUID...
Comment #17
rachel_norfolkComment #18
Eli-TWould be good to update the test that checks the block placement for the new block on the Recipe page too.
Comment #19
rachel_norfolkon it...
Comment #20
rachel_norfolkOkay - made a start on this but *not working yet*. I need to get on the bike home before it gets dark (if the sun get too low, I don't want to be too close to any errant Dukes...)
Comment #21
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedPicking this up from where rachel_norfolk left off.
Comment #22
rachel_norfolkJust adding a test run on my "non working" patch so there is canonical description of it not working.
Comment #23
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedHi Rachel, glad to hear you didn't have a run in with Phil back in Norfolk!
Update on where I'm up to: the blocks are working fine, that all looks good and then onto testing. Took a while to set up to get the tests (any test) to pass on my environment due to a PHP7 issue and now working through syntax. There is some work to do around line 50 where it is currently breaking but I don't think there is going to be much left to do thanks to your efforts on this.
Comment #24
rachel_norfolkOoooooooh - just realised something! I changed the data structure a bit in expectedBlocks() and then changed how it was used a little in assertImportedCustomBlocks() all week and good.
Thing is, expectedBlocks() is also called at line 48 in testReinstall(). That needs adapting in a similar way to assertImportedCustomBlocks() to match the changed data.
Comment #25
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedYes Rachel that’s it. Hopefully when that’s in we’ll get a pass and if not will strip out bits to troubleshoot.
Comment #26
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedRemoved tag novice.
We are working on UninstallDefaultContentTest.php, documenting lines I have isolated:
at line 48 and closing bracket seems to be correct.
$block = $block_storage->loadByProperties(['uuid' => $block_info['uuid']]);
is causing a problem in the two places it appears. $block_info['uuid'] probably needs expanding.
I think there may be something else with the assertImportedCustomBlocks() but if there is it will be hard to trace from errors due to it breaking from where the function is called.
Consider renaming UninstallDefaultContentTest.php it appears the tests have expanded since the file got its name.
Comment #27
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedGot this to pass, patch to come.
Comment #28
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedWent back to the 8.7.x version of this file and added path variable to the array so we are checking disclaimer and promo blocks only on the recipes page along with recipes banner block (as before) but now we're checking for the new block on the front page too. With this approach we do not check those blocks on both pages but we avoid problems with other tests cycling through the same block twice.
Comment #29
shaalTested, it looks great
(and delicious!)
Comment #30
rachel_norfolkHi Shaal - thanks!
If you could detail how you texted it (and that is probably very obvious) and show a little screenshot or two showing where the recipe appears and that the recipe index shows the new image at the top, then that would probably count as an appropriate level of testing evidence to take this forward to RTBC. Would love that extra detail on the testing to get you a credit on this issue!
Comment #31
shaalHi Rachel.
Oops. Sorry about that, we discussed it further during the OOTB conference call, I'll add all the details here -
There are 3 items in the main menu Hero, Articles and Recipe
There's a new hero image for
/recipes
pageCompared to the existing hero image on the homepage -
We discussed that a new image will be designated to a new hero on
/articles
page to keep consistency.A new issue will be created for that.
Here's the current
/articles
page -But when I tested it on RTL, there was a major accessibility issue, since the bright color text is placed on top of food texture
Here's the problem on homepage RTL -
Here's the problem on
/recipes
RTL -Solutions we discussed were:
There's another minor related issue -
The
/recipes
hero headline is "Vegan chocolate brownies",but the title of the recipe that it is linked to is "Vegan chocolate and nut brownies"
Comment #32
rachel_norfolkHmm - I wonder if the most obvious solution, given we know the images contain no text, is simply to flip them in css?
Comment #33
shaalI don't think flipping the background image hero will provide a good solution to this problem.
Flipping background images will manipulate the content. When users test out OOTB on RTL and upload their own images they might get unexpected results if their images contain text.
Comment #34
Eli-TCan we please keep the conversation about dealing with text contrast ratio in banner images in #2960795: Text fails contrast in banner please? This is a known problem that is being discussed, is not exacerbated particularly by this issue and should not stop this issue from moving forward.
Comment #35
Eli-TI have spun this up locally with quick start and it looks great.
Couple of points. Firstly I'm not sure why we're referring to this as the Front banner rather than the Home banner. We mostly refer to this page as the Home page rather than the Front page.
Secondly, we have some coding standards issues we need to fix:
InstallHelper.php last indentation in this block in importBlockContent() is two spaces too much
UninstallDefaultContentTest.php has duplicate newlines after assertImportedCustomBlock() and at the end of the file.
Comment #36
rachel_norfolka little lunchtime distraction...
think I've got everything in #35 and the final comment in #31.
Comment #37
Eli-TDefinitely getting there!
Think we've been over-zealous on the whitespace at the bottom of the UninstallDefaultContentTest class. There is supposed to be a blank line between the closing brace of the expectedBlocks() function and the closing brace of the class.
Also the link in the new block is in uppercase
Whereas the corresponding block on the home page is not
I'm also not sure why one uses the recipe title and the other says "view recipe". The recipe title actually seems redundant in the link so view recipe
makes more sense. One for @kjay I suspect.
Comment #38
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedI think 'View recipe' is the better option without uppercase, but if keeping uppercase is preferred it should move to CSS.
I'll action #37 at the weekend if no one gets there first.
Comment #39
Eli-TI think keeping the uppercase is unlikely given #2958239: Readability problem with all-caps text in core themes
Comment #40
rachel_norfolkI just followed the mock-up in #9.
Comment #41
kjay CreditAttribution: kjay commented'View recipe' seems like a good idea to me (without the uppercase).
I had always hoped we could return to the buttons being labelled 'View recipe', 'View article', etc, as per the designs. I am not sure what technical reason meant we ended up with the title being repeated which is makes the button so big, I've always been tempted to suggest we move away from a button if it's an essential it contains so much text!
I wonder if this was an accessibility decision?
Comment #42
rachel_norfolkOops - sorted out my phpcs now!
Comment #43
Eli-TI have spun this up again and confirmed it does as intended. The new image looks fantastic and I think the change to use View recipe on the buttons rather than repeating the title is the right one. Reviewing the patch shows the coding standards issues are now addressed.
Moving to RTBC.
Win sauce.
Comment #44
kjay CreditAttribution: kjay commentedThis looks great, really good to see some of the new images dropping into place and I think it works really well on this hero banner. Except...
I'm really sorry but I managed to miss a fudge on my photoshop work that really shows on my larger screen. There's still a hard edit line where I've joined the left side painted bits onto the left edge of the image. Should be fixed in the attached patch. Sorry for that!
Comment #45
Eli-TI've reviewed the interdiff and confirmed only the image has changed. Installing Umami and the glitch mentioned in #44 and confirmed with @kjay in Slack is now not present.
Returning to RTBC.
Comment #47
Eli-TFail looks unrelated. Putting back to Needs Review to retest.
Comment #48
Eli-TComment #49
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commented@Eli-T not clear why set back to RTBC after #47. Does this need further review and testing?
Comment #50
Eli-T@tonypaulbarker the patch in #44 looked good but the testbot failed. Looking at the testbot results, it looked like a failure that was unrelated to the changes we made, so I set the status back to Needs Review. This causes the testbot to try again without having to re-upload the patch. Once that test run was complete and successful, I set it back to RTBC as it had been reviewed, and both manually and automatically tested.
No further action should be required, unless the committers deem further changes are necessary.
Comment #51
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commented@Eli-T, gotcha. Thanks!
Comment #52
Gábor HojtsyPlease update issue summary with what is actually happening. Looks like the patch does not implement what the summary proposes.
Comment #53
rachel_norfolkUpdated IS - please review it now describes change more clearly.
Comment #54
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedThe summary looks good Rachel.
Corrected typo in the username of the original reporter.
Comment #55
tonypaulbarker CreditAttribution: tonypaulbarker at Synechis commentedAfter reading back, have also changed 'language' to 'text' to remove ambiguity under 'Proposed resolution' since this patch does not change multilingual content.
Comment #56
rachel_norfolkIn that case, I believe we can set it back to RTBC...
Comment #57
Eli-T+1 for RTBC based on the new description.
Comment #58
Gábor HojtsySuperb, thanks all!
Comment #60
rachel_norfolkNot that it matters a whole lot to me but what makes #2953995: Update the Umami Vegan Chocolate Brownie recipe an umami content patch that gets back ported and this one not? There's only content changes here, right? (assuming block content and the placement of blocks is counted as content)
Just trying to learn more about process.
Comment #62
Gábor HojtsyYeah this could go back to 8.6.x indeed. Thanks for calling that out.