🇬🇧United Kingdom @jessebaker

Account created on 27 September 2017, almost 7 years ago
#

Merge Requests

More

Recent comments

🇬🇧United Kingdom jessebaker

@sea2709 Please don't apologise, the work you have done here is fantastic and is going to make a huge impact to the UX and to our demo at DrupalCon.

I think I've resolved the Cypress issue and I've given some small feedback on your code but it's really great stuff!

🇬🇧United Kingdom jessebaker

RE #12 it looks like the test is still flakey but it's flakey in a slightly different way now! I think that counts as progress.

I've just fixed conflicts so this branch now has the fixes that were added in 📌 Redux Sync all single-value types in the SDC test all props form Fixed but I'm not able to look into this right now as other issues have priority.

🇬🇧United Kingdom jessebaker

jessebaker made their first commit to this issue’s fork.

🇬🇧United Kingdom jessebaker

Merged! This is a really nice improvement all round.

🇬🇧United Kingdom jessebaker

Approved - and love that this resolves the flakey components-slots test!

-> @wim leers for backend review

🇬🇧United Kingdom jessebaker

I've approved the MR. I actually like the removal of the delay on showing the tooltip from a UX perspective too - in this instance it makes the list feel more responsive and I don't think it's too annoying/jarring for a user that it just pops up instantly. Nice.

🇬🇧United Kingdom jessebaker

jessebaker made their first commit to this issue’s fork.

🇬🇧United Kingdom jessebaker

I've done some digging and Site Studio originally used to load the Media Library in an iFrame but had to resort to loading it directly on the page with their own custom CSS because it didn't play nicely when in an iFrame. I think there were several issues but the last of many smaller issues was an bug where after using the filter controls while Media Library was in an iFrame it became impossible to select an image.

This is not to say loading it in an iFrame is not possible or not the correct solution in the long term, but more to add a caveat that loading it in an iFrame is certainly not a quick win - and certainly not something I suspect we can achieve in time for the demo unless someone outside of Acquia is able to pick this up and bring it to completion.

🇬🇧United Kingdom jessebaker

Thanks all. I've merged a fix. I also verified that (at least on MacOS) the fix does not prevent a11y screen readers from working with the announce.js functionality

🇬🇧United Kingdom jessebaker

Discussed with @bnjmnm - the announce div is included as part of a longer term plan to improve a11y so it's correct that we are loading it on the page. For now I'm going to just set the body to have overflow: hidden and be done with it.

🇬🇧United Kingdom jessebaker

There is also 🐛 The preview container height will overflow outside the canvas Needs review - perhaps that issue could be used to track/develop a temporary solution to @balintbrews's concern #8 ahead of the demo date.

🇬🇧United Kingdom jessebaker

This will ultimately be solved by [later phase] Total canvas size should be dynamic based on browser viewport size Needs review but we will need a solution in time for the Drupalcon BCN demo.

🇬🇧United Kingdom jessebaker

@soaratul Test in pseudo code as discussed:

  1. Open page
  2. Click first header
  3. Validate that it has a required attribute
  4. Remove the value from the field
  5. Ensure the preview does NOT change
  6. With the value still blank (invalid) ensure further interaction is "locked" e.g...
    1. - ensure you can't select a different component
    2. - ensure you can't drag a new component on
    3. - ensure you can't rearrange components
    4. - ensure you can't delete a component
  7. Put a new value in
  8. Ensure the new value shows in the preview
  9. Ensure you now CAN select a different component, drag, rearrange, delete etc.
🇬🇧United Kingdom jessebaker

I'm afraid I have quite a bit of feedback!

The zoom commands (CMD/CTRL and + CMD/CTRL and -) are currently zooming the whole interface due to default browser behavior.

This seems to be fixed but the new test introduced in this MR is not actually testing that. TBC if it's even possible to test that the default browser behaviour is being prevented in a Cypress test!

There seems to a bug that means that pinch-zooming on a trackpad on Mac can also sometimes zoom the whole browser, this should also be addressed here.

This is not addressed yet. (mouse moving between iframe and parent during the zoom action causes it) - lets raise another issue for this specifically.

The MR is adding the ability to press the 0 key to reset the zoom but

  1. If you focus in the iframe and then press (specifically) NUMPAD0 it doesn't pass that event up to the parent. (The other 0 key works)
  2. The new test introduced does not test for the above usecase.

If you zoom to an irregular zoom amount (like 83% instead of one of the zoom amounts listed in the dropdown) using pinch zoom (or ctrl + mouse wheel) and then press +, the zoom snaps to 25%. I don't know if this was introduced in this MR.

🇬🇧United Kingdom jessebaker

Tested, and code reviewed. Merging!

🇬🇧United Kingdom jessebaker

jessebaker made their first commit to this issue’s fork.

🇬🇧United Kingdom jessebaker

I just had to make one small change to the tests - each it() block should not depend on the previous test having run successfully to pass. They should be independent. I moved the 3 new tests into a single it block. See https://docs.cypress.io/guides/references/best-practices#Having-Tests-Re...

🇬🇧United Kingdom jessebaker

@shyam_bhatt You're code change does seem to resolve the issue, but I fear it is just treating a symptom and not addressing the cause.

This issue seems to have been introduced in https://www.drupal.org/project/experience_builder/issues/3454173 📌 Media Library integration (includes introducing a new main content renderer/`_wrapper_format`) Fixed

The addition of - system/base in experience_builder.libraries.yml means the /xb page is now loading extra JS libraries. One of which is announce.js. The code in announce.js add a new div to the page at the bottom of the body with a height/width of 1px that sits below the experience builder div and is what is causing the scrollbar.

Assigning to @bnjmnm to take a look.

🇬🇧United Kingdom jessebaker

Changing the resolution of the viewports available in the demo is fairly easy but requires manually tweaking the canvas size and possibly updating some tests (tbc). It would be good to definitely all agree on which viewports we want before implementing.

I agree that 1024 is very small for a desktop/laptop these days but it's still a common size for iPads/tablets.

I think designing with a 1080p viewport will be challenging on anything less than a 4k screen and I'm not sure how well it would demo at that resolution.

My suggestions

For the demo:
Desktop: 1280*768
Mobile: 400*768

Medium term:
Introducing a 3rd viewport and renaming the existing one to tablet:
Desktop 1920*1080
Tablet 1024*768
Mobile: 400*768

Longer term:
Number of breakpoint viewports and each of their resolutions will be user defined/configurable.

Also, can I please clarify how the decision was reached to not build the demo SDC's responsively (to work at all resolutions)? My guess is that it was just done in the interest of speeding up development but I just want to make sure I understand correctly in case I'm making a wrong assumption there and there is not some other (technical or intent related) reason that I should be considering in future.

🇬🇧United Kingdom jessebaker

Updated the Proposed resolution in the issue summary.

🇬🇧United Kingdom jessebaker

@omkar-pd I attempted to get the tests passing but I have run out of time, unassigning and setting to Needs work for your (or someone else) to take another look.

🇬🇧United Kingdom jessebaker

@omkar-pd I don't think that scrollbar on the right should be there at all! Is the screenshot taken on Windows?

🇬🇧United Kingdom jessebaker

@wim leers yes! The title was written too hastily (by me) in my attempt to get a fork up and running to attempt to fix it and then you jumped on it before I could rename it to be more specific, so thank you!

It looks like my attempted fix for the Cypress test has passed at least once. I'm going to run it a few more times to be a bit more reassured that it's truly solved.

🇬🇧United Kingdom jessebaker

@boulaffasae Your description is accurate of the issue I've been addressing here and I believe that this is now fixed if you would like to try and re-test!

🇬🇧United Kingdom jessebaker

jessebaker made their first commit to this issue’s fork.

🇬🇧United Kingdom jessebaker

This is not passing the tests yet. Please ensure the tests pass before setting status to Needs review.

🇬🇧United Kingdom jessebaker

jessebaker made their first commit to this issue’s fork.

🇬🇧United Kingdom jessebaker

Merged, this was just left-over debug code. Thank you!

🇬🇧United Kingdom jessebaker

@tedbow I have fixed 2/3 of the failing tests. The 3rd test seems to be failing on something specific to this branch so I believe it’s a legitimate bug.
After choosing an image from the Media Library there is an error when making a request to /api/preview/node/1
as follows:

The website encountered an unexpected error. Try again later.<br>
<br>
<em class="placeholder">Drupal\Core\Render\Component\Exception\InvalidComponentException</em>
: [image.src] Does not match the regex pattern ^(/|http).*\.(png|gif|jpg|jpeg|webp)(\?.*)?(#.*)?$ in <em class="placeholder">Drupal\Core\Theme\Component\ComponentValidator-&gt;validateProps()</em>
(line <em class="placeholder">203</em>
of <em class="placeholder">core/lib/Drupal/Core/Theme/Component/ComponentValidator.php</em>
). <pre class="backtrace">Drupal\Core\Template\ComponentsTwigExtension-&gt;doValidateProps(Array, &#039;experience_builder:image &#039;) (Line: 103)
Drupal\Core\Template\ComponentsTwigExtension-&gt;validateProps(Array, &#039;experience_builder:image &#039;) (Line: 42)
__TwigTemplate_331ff7e5a20fda144110fb9d0e1512e8-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array, Array) (Line: 123)
__TwigTemplate_a529a4e6ed6302d18950f54e7bf80640___162390326-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array) (Line: 40)
__TwigTemplate_a529a4e6ed6302d18950f54e7bf80640-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array) (Line: 335)
Twig\Template-&gt;render(Array) (Line: 38)
Twig\TemplateWrapper-&gt;render(Array) (Line: 234)
Drupal\Core\Template\TwigEnvironment-&gt;renderInline(&#039;{# inline_template_start #}{# This template was dynamically generated by single-directory components #}
{% embed &#039;experience_builder:image &#039;%}
{% endembed %}
&#039;, Array) (Line: 54)
Drupal\Core\Render\Element\InlineTemplate::preRenderInlineTemplate(Array)
call_user_func_array(Array, Array) (Line: 107)
Drupal\Core\Render\Renderer-&gt;doTrustedCallback(Array, Array, &#039;Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725 &#039;, &#039;exception &#039;, &#039;Drupal\Core\Render\Element\RenderCallbackInterface &#039;) (Line: 825)
Drupal\Core\Render\Renderer-&gt;doCallback(&#039;#pre_render &#039;, Array, Array) (Line: 387)
Drupal\Core\Render\Renderer-&gt;doRender(Array) (Line: 459)
Drupal\Core\Render\Renderer-&gt;doRender(Array) (Line: 459)
Drupal\Core\Render\Renderer-&gt;doRender(Array, ) (Line: 203)
Drupal\Core\Render\Renderer-&gt;render(Array) (Line: 475)
Drupal\Core\Template\TwigExtension-&gt;escapeFilter(Object, Array, &#039;html &#039;, NULL, 1) (Line: 147)
__TwigTemplate_8d68d944fd3cb9a2ce56e894397a334b___1318261257-&gt;block_column_two(Array, Array) (Line: 430)
Twig\Template-&gt;yieldBlock(&#039;column_two &#039;, Array, Array, 1) (Line: 193)
Twig\Template-&gt;renderBlock(&#039;column_two &#039;, Array, Array) (Line: 66)
__TwigTemplate_99ea5cc98d60103a120c7f4dc604a8ad-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array, Array) (Line: 125)
__TwigTemplate_8d68d944fd3cb9a2ce56e894397a334b___1318261257-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array) (Line: 40)
__TwigTemplate_8d68d944fd3cb9a2ce56e894397a334b-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array) (Line: 335)
Twig\Template-&gt;render(Array) (Line: 38)
Twig\TemplateWrapper-&gt;render(Array) (Line: 234)
Drupal\Core\Template\TwigEnvironment-&gt;renderInline(&#039;{# inline_template_start #}{# This template was dynamically generated by single-directory components #}
{% embed &#039;experience_builder:two_column &#039;%}
  {% block column_one %}
    {{ column_one }}
  {% endblock %}
  {% block column_two %}
    {{ column_two }}
  {% endblock %}
{% endembed %}
&#039;, Array) (Line: 54)
Drupal\Core\Render\Element\InlineTemplate::preRenderInlineTemplate(Array)
call_user_func_array(Array, Array) (Line: 107)
Drupal\Core\Render\Renderer-&gt;doTrustedCallback(Array, Array, &#039;Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725 &#039;, &#039;exception &#039;, &#039;Drupal\Core\Render\Element\RenderCallbackInterface &#039;) (Line: 825)
Drupal\Core\Render\Renderer-&gt;doCallback(&#039;#pre_render &#039;, Array, Array) (Line: 387)
Drupal\Core\Render\Renderer-&gt;doRender(Array) (Line: 459)
Drupal\Core\Render\Renderer-&gt;doRender(Array) (Line: 459)
Drupal\Core\Render\Renderer-&gt;doRender(Array) (Line: 459)
Drupal\Core\Render\Renderer-&gt;doRender(Array, ) (Line: 203)
Drupal\Core\Render\Renderer-&gt;render(Array) (Line: 475)
Drupal\Core\Template\TwigExtension-&gt;escapeFilter(Object, Array, &#039;html &#039;, NULL, 1) (Line: 80)
__TwigTemplate_77fd3c900ebe4612a401cff4784a3799-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array) (Line: 335)
Twig\Template-&gt;render(Array) (Line: 38)
Twig\TemplateWrapper-&gt;render(Array) (Line: 33)
twig_render_template(&#039;core/modules/system/templates/page.html.twig &#039;, Array) (Line: 348)
Drupal\Core\Theme\ThemeManager-&gt;render(&#039;page &#039;, Array) (Line: 446)
Drupal\Core\Render\Renderer-&gt;doRender(Array, ) (Line: 203)
Drupal\Core\Render\Renderer-&gt;render(Array) (Line: 475)
Drupal\Core\Template\TwigExtension-&gt;escapeFilter(Object, Array, &#039;html &#039;, NULL, 1) (Line: 81)
__TwigTemplate_3a9bda3284efa427aa1dce14c22e6c78-&gt;doDisplay(Array, Array) (Line: 360)
Twig\Template-&gt;yield(Array) (Line: 335)
Twig\Template-&gt;render(Array) (Line: 38)
Twig\TemplateWrapper-&gt;render(Array) (Line: 33)
twig_render_template(&#039;core/modules/system/templates/html.html.twig &#039;, Array) (Line: 348)
Drupal\Core\Theme\ThemeManager-&gt;render(&#039;html &#039;, Array) (Line: 446)
Drupal\Core\Render\Renderer-&gt;doRender(Array, 1) (Line: 203)
Drupal\Core\Render\Renderer-&gt;render(Array, 1) (Line: 108)
Drupal\Core\Render\Renderer-&gt;Drupal\Core\Render\{closure}() (Line: 593)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 107)
Drupal\Core\Render\Renderer-&gt;renderRoot(Array) (Line: 66)
Drupal\Core\Render\BareHtmlPageRenderer-&gt;renderBarePage(Array, &#039;&#039;, &#039;page &#039;, Array) (Line: 76)
Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer-&gt;renderBarePage(Array, &#039;&#039;, &#039;page &#039;) (Line: 388)
Drupal\experience_builder\Controller\SdcController-&gt;preview(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 37)
Drupal\Core\Test\StackMiddleware\TestWaitTerminateMiddleware-&gt;handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength-&gt;handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState-&gt;handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
require(&#039;/Users/jesse.baker/Workspace/drupal11/web/index.php &#039;) (Line: 71)
</pre>
🇬🇧United Kingdom jessebaker

All fixed! Hooray!

Follow up to address that last nice to have is created here: 📌 Improve/Refactor replaceUUIDsAndUpdateModel() and insertMultipleNodes() Active .

🇬🇧United Kingdom jessebaker

@sea2709 the work you have done in https://git.drupalcode.org/project/experience_builder/-/merge_requests/241 seems to be a good approach to me. As you mentioned it covers more use cases (like loading in the component's CSS and JS) than what we have now.

However I think more work is required before it can be merged. These issues do seem quite challenging to solve, but ultimately are required for a good UX.

1) On hover there is a flash/flicker where the tooltip container (the div with the dropshadow) shows but the iFrame has not yet loaded. Can this be improved to look smoother.

2) The scaling seems to be wrong. Ideally a small button would display full size but a large Hero component would be scaled to a maximum width to fit inside the tooltip

3) the height of the tooltip is fixed and a lot taller than it needs to be.
(see above screenshot)

🇬🇧United Kingdom jessebaker

I don't think this is reproducible on head now that 📌 Improve the page hierarchy display Active just got merged in? Can someone who was able to reproduce this before please try again on 0.x?

🇬🇧United Kingdom jessebaker

I've just approved this from the /ui code perspective. There is obviously more to be done here, but I see no reason not to go ahead and merge this as a significant step forward.

🇬🇧United Kingdom jessebaker

@Wim Leers Would it be safe to change the title of this ticket to "Create Cypress E2E test to ensure that /enum fields in the components prop form work" or is there some unique aspect of "variants" that specifically needs to be tested here?

🇬🇧United Kingdom jessebaker

Minor thing, but as per https://www.drupal.org/project/experience_builder/issues/3459249 📌 Allow opening the contextual menu by right clicking a component Needs work it should be possible to right click directly on a component, not just its name label.

🇬🇧United Kingdom jessebaker

I've given @balintbrews as much context about this issue as I can so hopefully he can assist with anything you need next week.

🇬🇧United Kingdom jessebaker

@balintbrews - has your work on the side panel made this ticket out dated?

🇬🇧United Kingdom jessebaker

@balintbrews I'm sorry I didn't get to this before my time off! I think the best course of action here is to merge what has been done because it is a big improvement and then open a follow up ticket to further address the issue (now instead of jumping the view, it simply stops the panning from working).

🇬🇧United Kingdom jessebaker

RE #7

I'm wondering if we could be opinionated about section templates and as a UX enhancement, only allow adding them to the main level.

I don't think this would be beneficial for two reasons

1) If the issue is that it is difficult with the current UI to accurately place the thing you are drag/dropping into nested slots then we will still need to solve that problem for components so just preventing sections from working in that way would just be a sticky plaster
2) Ultimately I don't think we need to restrict users in that way - As an example, a given user's particular page layout may be based around having a large layout component that has a slot for all the page content and they would want to place their sections inside that larger component.

🇬🇧United Kingdom jessebaker

In Site Studio's Visual Page Builder the target slot (or Dropzone to use their terminology) is highlighted with a dotted border when you are dragging and hovering over the slot. I think we should have something similar.

🇬🇧United Kingdom jessebaker

RE #8 Have you tried a cache clear since checking out this branch? I think that is what I did to resolve the same issue.

🇬🇧United Kingdom jessebaker

Thanks for pushing forward with this. I’ve added some design/UI feedback to the MR. I’ve not yet done a code review. I will leave that until the UI is looking correct unless you have any specific parts of the code that you would like feedback on before you continue.

Production build 0.71.5 2024