Just curious: can a custom bootstrap theme break Wappler?

Yesterday I played around with a custom theme. I added it to Wappler according to the docs and so far, it worked. Very simple playground project: just a couple of thousand entries in SQlite DB and a paged query with sorting and a simple modal to edit the data.

After adding the theme, the page still worked, however, I wanted change the edit and delete buttons into a dropdown… but here we go: my modals are no longer available in the Actions Editor. But now I have some random buttons in the actions editor out of nowhere (there’s only one button in the project).

So could the theme and it’s associated javascript mess up Wrappler?

Can you show the HTML code from the page for the modals? I believe the app structure looks at tags and classes; I would imagine the same is said for the picker but seeing the code may show if/where the inconsistency lies

Do the modals have the is tag?

is="dmx-bs5-modal"

Sample modal for reference to the is tag:

<div class="modal" id="modal1" is="dmx-bs5-modal" tabindex="-1">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Modal title</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <p>Modal body text goes here.</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                    <button type="button" class="btn btn-primary">Save changes</button>
                </div>
            </div>
        </div>
    </div>

Have you set the Framework to Custom Bootstrap and pointed it to the themes respective css and js?

Theoretically, themes should not interfere with Wappler. They usually only affect colours.

I have tried to replicate the problem as you have described, without success. This brings me to think that the messup has ocurred elsewhere.

image

Please compare your code with the following

Sure. But as I said, nothing has changed on the pages except me adding the scripts and css for the new theme.

Yes, and I added some addtional scripts.

The page itself runs as expected, its just that the Action Editor is showing garbage. The Structure in the panel is also correct.

Just trying to work through possibilities…

If you remove or comment out the theme css/scripts do they show again?

Thats’ what I would expect, unless the chrome view inside Wappler is not fully sandboxed.

Not all, many of them come with additional extensions, and that’s where I think Wappler get’s confused.

I am not bound to this theme, I just wanted to try it out and check if it works within an Environment like Wappler, but now I got courious.

Edited, because I haven’t had enough coffee yet and misunderstood the question :slight_smile:

Here, here :coffee:

Don’t forget to click the refresh button on App Structure to make sure it reflects the latest changes to your code

Thats my best friend atm :rofl:

As I said, It’s not a biggy for me, just courious.

wapplerBSThemeTestWithPagination.zip (3.3 MB)

I thinks it’s easer to have a look at the sources than looking at screenshots. And also to see if this is the same problem for others.

/heiko