Resolve #3461101 "Remove sdc test dependency"
Closes #3461101
Merge request reports
Activity
added 5 commits
- 4c023d25 - Remove `sdc_test` component.
- d194a116 - Add new required `cta1href` prop to `my-hero` component — to be able to...
- db298b18 - New `component` config entity for `my-hero`.
- 6bae9cd5 - Update all default values to use `my-hero` instead of `sdc_test:my-cta`.
- dc4885fa - Remove obsolete `sdc_test` dependency.
Toggle commit listadded 2 commits
added 1 commit
- c3c2899a - `TwoTerribleTextAreasWidget`: gracefully handle component props that do not...
assigned to @wimleers
requested review from @bnjmnm
added 1 commit
- 7980e856 - Slightly adjust `FieldTypeUninstallValidatorTest`.
added 3 commits
-
7980e856...5ac26e2a - 2 commits from branch
project:0.x
- 80dda8cc - Merge remote-tracking branch 'origin/0.x' into 3461101-remove_sdc_test_dependency
-
7980e856...5ac26e2a - 2 commits from branch
added 1 commit
- b679ad09 - make value always exist for each prop in the dummy form request.
79 79 if (propData.expression) { 80 80 preparedModel[selectedComponent as keyof PreparedModel][propName].expression = propData.expression; 81 81 } 82 // The current value of the prop. 83 if (selectedModel[propName]) { 84 preparedModel[selectedComponent as keyof PreparedModel][propName].value = selectedModel[propName]; 85 } 82 83 // The current value of the prop, or an empty string so the `value` is at 84 // least present. 85 preparedModel[selectedComponent as keyof PreparedModel][propName].value = selectedModel[propName] || ''; I had to make this change in order for the props edit form to work. It probably isn't
technically
in scope of this issue, but something this issue made it much easier to encounter this normal/valid use case.Perhaps all manual testing prior to this was with SDCs that had default values available for their props, but while reviewing this MR, it demonstrated that each prop must have a
value
key, even if there's currently no value. If this theory is correct, I'd like to just sneak this change in with the MR since it nicely reproduces the issue then fixes it. If I'm incorrect and this is actually a problem with the MR itself then of course lets address the underlying problem.
1 <div style="font-family: Helvetica, Arial, sans-serif; width: 100%; height: 100vh; background-color: #f5f5f5; display: flex; justify-content: center; align-items: center; flex-direction: column; text-align: center; padding: 20px; box-sizing: border-box;"> 1 <div {{ attributes }} style="font-family: Helvetica, Arial, sans-serif; width: 100%; height: 100vh; background-color: #f5f5f5; display: flex; justify-content: center; align-items: center; flex-direction: column; text-align: center; padding: 20px; box-sizing: border-box;"> 2 2 <h1 style="font-size: 3em; margin: 0.5em 0; color: #333;">{{ heading }}</h1> 3 3 <p style="font-size: 1.5em; margin: 0.5em 0; color: #666;">{{ subheading }}</p> 4 4 <div style="margin-top: 1em;"> 5 <button style="background-color: #007BFF; color: white; border: none; padding: 15px 30px; font-size: 1em; margin: 0 10px; cursor: pointer; border-radius: 5px;"> 5 <button formaction="{{ cta1href }}" style="background-color: #007BFF; color: white; border: none; padding: 15px 30px; font-size: 1em; margin: 0 10px; cursor: pointer; border-radius: 5px;"> This entire component is pretty weird, with buttons that don't do anything. I'd rather keep evolving this component out of scope here.
The only reason I added the
cta1href
prop tomy-hero
is to not lose/reduce test coverage.Making
my-hero
make sense is out-of-scope. Making XB easier to contribute to by not requiring thesdc_test
module anymore is more urgent than improving a clearly intentionally silly dummy component