feat(banner): banner without title and no clickable #1069
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
From motive, our intention is to have banners that are not clickable and do not have a title. Right now, the X banner forces any banner to have a URL to redirect to and a title. In this PR we propose a solution to support X banners and the banners Motive needs.
Main changes
banner.model.ts
url
andtitle
are optional.banner.vue
h2
) will not be rendered.banner.spec.ts
We have defined some unit tests at component level using Jest(
x-components/src/x-modules/search/components/__tests__/banner.spec.ts
) and others using Cypress(x-components/tests/unit/banner.spec.ts
). We use Cypress to check that when loading an image, if an error occurs the banner is not rendered.For the tests we have modified the existing banner factory, this has caused some changes in other tests(
mocked-responses.spec.ts
).