- 🇮🇪Ireland lostcarpark
I thought this would need a Svelte code change, but when I pushed that change it caused a test to fail. Looking at the fail, I needed to move a container class back, which was when I realised the Svelte change wasn't needed and it could all be done with CSS.
I've moved the Search box inside the grey filter area. I think this connects them better visually, and allows the spacing to be tightened up:
I also checked it doesn't break in mobile view:
I think there would be scope for a more radical change, but after discussing in Slack, there wasn't an appetite for that, so I've kept it to simple tightening of the spacing.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Created issue for #3.1: 🐛 ApiConfigControllers::post() should detect a conflicting ID and throw a 409 exception Active .
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Currently sending a
machineName
that's already taken results in a 500 error, which Wim already explained in a Slack conversation that:We'll need to change that to return a 409 (conflict).
Besides the 422 error, what other errors can we expect?
No other HTTP status codes; you should only see 409 and 422.
Note: I agree the value is currently limited. But as soon as ✨ Defining props for code components Active lands, there'll be even more possibilities for validation errors: props must be named in a particular way, for example (just like
machineName
in the example above). And the name of a prop must not be used by a slot, and vice versa.So: the more complete 🌱 [Meta] Plan for code components Active becomes, the more valuable this becomes.
For more context:
- the test cases in
\Drupal\Tests\experience_builder\Kernel\Config\JavaScriptComponentValidationTest::providerTestEntityShapes()
that start with the string'Invalid:
for a sense of what validation errors could occur. - ⚠️Note that this relies almost completely on SDC's metadata validation, which itself is incomplete/inaccurate — for example ✨ SDC DX does not inform about invalid JSON schemas Active .
- the end-to-end HTTP API test coverage for these config entities — which is nowhere near as complete as I'd like — at
\Drupal\Tests\experience_builder\Functional\XbConfigEntityHttpApiTest::testJavaScriptComponent()
. I know for sure that the renaming/remapping in\Drupal\experience_builder\Entity\JavaScriptComponent::normalizeForClientSide()
is not being respected when generating validation errors, so a validation error for a key the client sent may return a validation error for a different key: in the server-side representation.\Drupal\experience_builder\Controller\ApiConfigControllers
should be usingConstraintPropertyPathTranslatorTrait
but doesn't yet.
… but none of that is actually a blocker for this issue — this issue can pretend none of those problems exist, and in a future server-side issues we can fix all that — when somebody runs into it :)
Did you see
- Bonus: use the
pattern
attribute for providing client-side validation, to make the user immediately aware? 🤓
?
That'd literally prevent the 422 in the screenshot from ever occurring!
- the test cases in
- 🇦🇺Australia acbramley
I've started tackling rolling #114 on to 11.x but there are some pretty major issues:
1. the presave hook is gone, I've moved it into the new OOP hooks class
2. SmartDefaultSettingsTest is an absolute nightmare to maintain. I've done my best to fix all the failures but there's 8 test cases still failing on the expected db log messages
3. There were some other pretty major conflicts which I hopefully have fixed properly.Please don't upload any more patches, let's try to get this in!
- @acbramley opened merge request.
- 🇳🇱Netherlands balintbrews Amsterdam, NL
Made some edits to better reflect that errors are already handled, but the error details are not exposed.
Besides the 422 error, what other errors can we expect?
Currently sending a
machineName
that's already taken results in a 500 error, which Wim already explained in a Slack conversation that:500 you should NEVER see on a live site: it essentially always means “Server-side bug”.
With that said, I don't think we should be concerned about that before we tackle 📌 JavaScriptComponent config entities should have mutable machineNames Active , which would mean the client doesn't need to send what is used as the
id
entity key for the config entity. Automatically closed - issue fixed for 2 weeks with no activity.
- 🇬🇧United Kingdom AaronMcHale Edinburgh, Scotland
benjifisher → credited aaronmchale → .
- Issue created by @jessebaker
- Issue created by @benjifisher