Join the Webstudio community

Updated 11 months ago

Use Brackets in Collection Autocomplete

At a glance
When drilling down into a JSON response, array items and items with special characters suggest dot notation in autocomplete.

Maybe either conditionally render rackets e..g (item[0] or item["My Field"]) or always render brackets? Not sure if there's a downside to always doing it but seems simple enough.

Suggestion/bug
Attachment
image.png
1
O
J
B
22 comments
we already discussed this with @TrySound, he says codemirror simply doesn't support that, we need ot reach out to them and see if they can fix it, it's kinda unbelievable since that tool exists for a long time and should know better
I tried to find an issue on codemirror repo without luck, maybe @TrySound can find one if you know how to search or create one
unless we are using it wrong, it a bug
maybe we can auto-fix the renderingwhen we see .{number} ?
Strange! Yeah maybe continue showing whatever in the UI but when it actually comes to using it in code just convert everything to brackets
Well done Bogdan!! Thanks for doing this
Hi John, I am currently using Webstudio free cloud plan, I have been trying to using the collection element (JSON response) and I haven't been successful. I am a Designer, I just want to ask if you could help me by pointing out how to use dynamic data in Webstudio using the JSON response. Thanks.
@John Ope from CIQ Libraries Hey so lemme know if there's somewhere specific you are not having luck. Alex has a great video going over this: https://www.youtube.com/watch?v=KsXGtWiyuNA

And the issue in this thread will be deployed live soon which will make selecting the JSON response much easier

I also plan on creating a video in my course once the update is rolled out
Ok, I am having trouble on how to use the JSON response.. the resource response Alex explained works for the pro plan.
Data fetching / Resource is on pro plan only
JSON data is static user defined json
Otherwise check out the launch vid on yt
Is there a tutorial on how to use the JSON data, speaking from a designer point of view.
I have seen the video... I am currently on the free cloud plan
It's basically the same as the resource in terms of expression editor
What's your use case btw?
We haven't made a dedicated demo for json type
Thinking maybe building a navigation with menu points in json and reusing that between desktop and mobile nav
@John Ope from CIQ Libraries My plan was to move my portfolio site from Webflow to Webstudio, because of the ability to use custom domain on its free plan... I currently can't afford the pro plan for now. I will continue using Webflow (Webflow gave me free CMS plan) till I can upgrade my Webstudio plan. Thanks
Add a reply
Sign up and join the conversation on Discord