Thanks to this post with @dcoletta and this post with @Suzie I discovered the functionality of inserting code from airtable in a list block of softr. This is truly an exceptional feature, opening up many possibilities for me.
But when I deploy it, I realize that the responsive does not work well.
I tried several things:
the basic code, by modifying the width= parameter towards auto or 100% or 30%
the code with a div tag (see below) with the src="https://cdnjs.cloudflare. script in the airtable or in the header
But anyway, I canāt, you can see it on this screenshot with the red lines that frame the Inbox block which are not aligned with the purple lines from Text field with the script in the center.
Without knowing the responsive web but by logic I would say that it would be necessary to extract the width of this box and make it match with that of the block, right? Maybe there is a solution with a script? Very dark for me all this
For this bug, I believe it comes from a div tag imposed by the softr code just above. Indeed I tried a modification of the width of my iframe by a javascript code with the onload tag, but also a modification a posteriori. Anyway I can never get the CSS to match.
Here are some code examples, I really thought I could do it with these different optionsā¦ these codes are injected by airtable so you can find them in the database link above in the code injection field
I would suggest defining few const options like desktopWidth = ā900pxā, tabletWidth = ā600pxā and mobileWidth ā¦ and then based on window.innerWidth set the iframe width to either desktopWidth, tabletWidth or mobileWidth. You donāt need the parent divs
Do you think it will be clean for the user to have only 3 webresponsive positions? if my clients are on a 4k screen, itās going to be weird, right? according to you @artur, the parent div parameters are not useful or they are not accessible? Thanks
I still havenāt solved this problem despite your suggestions @artur, I donāt understand why the size always ends up being 300px. Out of curiosity I asked chatGPT, he suggested me to check if a React component was not disturbing my javascript functions, but I donāt know if it makes sense on Softr.
Anyway, in order to facilitate the debug, I made screenshots of the codes that I inject by airtable and associated comments with the hypotheses tested, all of this is available on the same softr web page available here
Yes thanks @Suzie I think it is necessary for me and for the community.
About me, I am in a test environment on the restaurant / kitchen application I shared, and I would like to be able to replicate all of this with confidence in my original application
EDIT : just tried the exact same code on my other website and itās working well
thank you @Suzie for coming back to me, not really functional because the embed part in the iframe always has the results directly displayed, so the script injected into the other page does not work when we embed the page