storyblok / field-plugin

Create and deploy Storyblok Field Plugin
https://www.storyblok.com/docs/plugins/field-plugins/introduction
25 stars 3 forks source link

feat(sandbox): add support for language #255

Closed demetriusfeijoo closed 1 year ago

demetriusfeijoo commented 1 year ago

What?

Allow the Sandbox user to pass a language to the plugin through postMessage.

Why?

JIRA: EXT-1812

It will allow users to test the language value and behavior of the field plugin.

Example of the new input on the mobile: image

Example of the new input on the desktop: image

When no language is informed: Screenshot 2023-08-21 at 08 31 16

When some language is informed: Screenshot 2023-08-21 at 08 33 09

How to test? (optional)

The sandbox/container, can be tested as described in our [CONTRIBUTING.md →]

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plugin-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 25, 2023 5:38pm
demetriusfeijoo commented 1 year ago

The new input field is not in the footer since being close to the URL input field seemed more natural to me and I would like to collect your opinions on that.

So, what are your thoughts on that @johannes-lindgren @eunjae-lee ?

eunjae-lee commented 1 year ago

To me, the position of the input box seems good. What do you think? @johannes-lindgren

johannes-lindgren commented 1 year ago

To me, the position of the input box seems good. What do you think? @johannes-lindgren

I think it should be moved further down; to the content section.

image

The preview section contains the iframe and an input field for the iframe src attribute. I think all the data belongs to the other accordions. I think there should be more inputs added later, for

demetriusfeijoo commented 1 year ago

Hey @johannes-lindgren, do you mean like that?

input-language-new-position
johannes-lindgren commented 1 year ago

Hey @johannes-lindgren, do you mean like that?

input-language-new-position

Yes, almost: below the JSON viewer, since the language input is less commonly used 🙂

When you develop a field plugin, you tend to use the options and the content JSON view the most.

demetriusfeijoo commented 1 year ago

Hey @johannes-lindgren, thanks for the comments and for guiding me through how to approach them. 🚀

Final result: Screenshot 2023-08-25 at 06 47 08