Comments (3)
Take the Image Block for example.
You have the generation of sizes gives certain options enabled
https://github.com/plone/volto/blob/main/packages/volto/src/components/manage/Blocks/Image/View.jsx#L70
https://github.com/plone/volto/blob/main/packages/volto/src/components/manage/Blocks/Image/utils.js#L13
When you add an image you see selected 2 options
The L size
and the Center align
That selection is fake actually because they are added as missing value defaults.
Since we store widget options within the data object, the data is empty and any code that checks for it will not find it.
The solution for instance to get the value "l" present in the data is to add here
https://github.com/plone/volto/blob/main/packages/volto/src/components/manage/Blocks/Image/schema.js#L83
default: 'l'.
Doing so the image size is set correctly and it shows up in the data as seen in this screenshot where I had default value 'm' to ensure that there is no fallback value selected:
EDIT:
Unless there is a widget value added to the data object which happens when you set a default in the schema, the sizes will return undefined which judging by the looks of the options selected it should have selected sizes: "100vw".
from volto.
@sneridagh have a look when you have time to the comment I left above
from volto.
from volto.
Related Issues (20)
- You cannot edit a user if you are authenticated with a Site Administrator. HOT 10
- @plone/types: Use Generics for contents query to make it easier to type custom content type responses HOT 4
- User control panel > Add user issues with validation errors HOT 6
- Unable to change language of Volto core HOT 26
- Create a pull request template aligned with Plone policies HOT 7
- Add towncrier files to ignore or rename `.keep` HOT 6
- Add Cypress test for search block sort on property
- Add Local Development Setup Instructions to README HOT 2
- Register component is broken
- Update github actions to use actions/upload-artifacts v4 HOT 2
- Error when testing customized Volto module in addon HOT 3
- @plone/client: `getQuerystringSearchQuery` doesn't accept path as an input
- Enhanced Accessible Media Workflow HOT 1
- @plone/client: API requests that don't return a 2XX HTTP Status result in an exception being raised
- Add a make command for `yarn i18n`, such as `make i18n`
- Cannot use useSelector in the "restricted" function of a Block HOT 2
- Multiple 404 Errors Triggered for Non-Existent Pages in Volto HOT 1
- @plone/client: getQuerystringSearchQuery discards all parameters except for the query
- @plone/types: Batching information missing from batched requests
- Use ImageWidget for Teaser override image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volto.