Release notes – Cleaner code, breaking changes, and right-click feature

Hi everyone :wave:

Today, we released an update that greatly improves the code generated when you publish a WeWeb app :partying_face:

The DOM of your live apps is now much cleaner because we removed superfluous wrappers.

As a result, your apps will be much lighter, faster, and it will be easier for you to implement custom CSS and accessibility features.

:warning: There are, however, a few breaking changes you should be aware of before you republish your app (more on these below).

To make this update possible, we’ve had to introduce some restrictions on how certain UIs can be built (for example, adding a link to a Kanban board or input element is no longer supported).

These changes encourage alignment with web development best practices and should only affect a small number of projects, but please don’t hesitate to reach out if there’s anything that’s unclear or you need help with an update.

Let’s take a look at what has changed.

Links

Before, you could add links on any element of your app, including inputs or a kanban for example. But this is not standard practice in web development.

Now, we will only handle links on certain elements, namely: sections, divs, containers, texts, icons, images, and buttons.

If, by any chance, you need to add a link to another type of element, say an input for example, you will need to wrap that element inside a div or container and set the link on the wrapper.

This is another step to help you follow web development best practices while building in the WeWeb editor.

:dart: Action required before you republish your app:

Use our search & copy link features to ensure that all links are properly configured.

links

BACKGROUND VIDEOS

Similarly to links, before, you could add background videos on any element of your app.

Now, background videos will only be displayed if they were added to a section, div, or container.

:dart: Action required before you republish your app:

If you added a background video on another type of element (e.g. a text element), we recommend that you move the background video to a container and republish your app.

DATAGRID

There is a very specific corner case where you may experience issues with the scroll behavior of a datagrid.

If you have a datagrid element with all the following settings:

  • a fixed width on the columns,
  • the sum of the width is bigger than the width of the datagrid itself, and
  • the datagrid has an overflow property set to auto or scroll

Before the release, you had a horizontal scroll on the Datagrid without needing to do anything. Now, because we removed the wrapper, the Datagrid will no longer have a horizontal scroll.

:dart: Action required before you republish your app:

Wrap the Datagrid inside a Flexbox and set the property overflow on the Flexbox. You will need to set the same width as you set for the Datagrid on the Flexbox.

DATE & TIME PICKER

In our Date and time picker element, there is a Flexbox Placeholder container. For this Flexbox, if you set the parameter Reverse on the value on , it swapped the text and icon on the left of the date picker, like this:

Now, with the property Reverse, if you set the value on, the text and icon are pushed to the right of the date picker:

:dart: Action required before you republish your app:

To have the same display as before the release: set the property Reverse to the value off, and manually switch the position of the element in the layout.

INPUTS (simple, advanced, masked)

In these three elements, if you defined a cursor, it was only applied to the border of the element and the text cursor was applied for the text area.

Now, it’s applied to the all element (border and text area).

CUSTOM CLASS CSS

Before, the DOM of your WeWeb apps included superfluous wrappers, identified by the ww-object and ww-object-elem CSS classes.

Now, these superfluous wrappers and CSS classes no longer exist.

:dart: Action required before you republish your app:

If you targeted the wrapper (the parent div) through JavaScript or with the ww-object or ww-object-elem classes in your custom code, you may need to update this code.

We recommend you add an id or class to the element you were targeting and update your custom code accordingly.

CODED COMPONENTS

In WeWeb, you can import custom Vue.js components to your workspace. The release impacts how these coded components work in combination with the WeWeb editor.

:dart: Action required before you republish your app:

If you’re not using coded components in your projects, there’s no action required :slightly_smiling_face: If you do leverage custom coded components in your WeWeb projects, then you may need to take action.

As this is more of an advanced subject that requires more in-depth technical context, we’ve put together a dedicated guide on the topic here.

To check if you are using custom coded components, go to the “Coded components” tab of your WeWeb workspace:

Ok, that’s it for now!

We’re very excited about this update because it’s a continuation of our efforts to standardize the code generated by WeWeb :slightly_smiling_face:

It will allow us to improve how CSS classes work in WeWeb and build new elements that are both powerful and more easily customizable, including but not limited to new tables, select elements, and dynamic form builders.

Of course, we will do our best to make this transition as smooth as possible for you! Should you have any questions, please feel free to reach out.

PS: try right clicking in the WeWeb Editor for a nice surprise :wink:

14 Likes

Just found a sneaky ‘outline’ and ‘offset’ feature that’s really juicy… :eyes:

5 Likes

Hey! I created some CSS classes and added them to the body (More → Custom Code) and assigned the class to the element via element → HTML attributes → class.

  1. After the release it gets overwritten by some other stuff (not defined by me) any ideas how to solve this?
  2. Also, I noticed that if we have a element (container) where I don’t define background, then in CSS I can see that it’s stated as background:none. Is this expected?

Thanks you, Paul

Thanks to everyone at WeWeb for their hard work. The finder window has been helpful in correcting the issues introduced in this update.

Tip for others: You can select “Custom” in the Finder dropdown and type any text, and it will search (seemingly) every spec of dna across every page and workflow. It even searches the contents of “Custom Javscript” nodes within workflows, and it’s very quick.

I am still nervous about republishing, but we’re in the midst of a big product launch and we will just have to roll with it…

+1 to people’s statements about doing these types of updates on weekends.

1 Like

How WeWeb is working at the moment it is inline some style define in the editor panel.
For most properties, if no value is defined, nothing is added in the style.
But for some of them, their is always a default value applied, and this might be what is occuring here.
You can inspect your css with Chrome dev tools to investigate.
Before most of this style were on the wrapper, and the class were on the root of the component, with this update there is no more wrapper, and this is why you may have conflicts.

This aims to be changed later, its part of our journey to be more and more closed to web standard concerning css.

An update of the publisher is already planned in one month

I’m not sure that is the case here, I apply the custom CSS class right on the text and by default it gets the background:null rule. Is this intended, would it not make more sense to just to omit the background rule? :thinking:

Hey everyone,

For some reason the DataGrid element is broken on my end after the update. It no longer respects height restrictions, expanding as far as the pagination allows it to go. The fix about datagrid is not exactly related to it. I have tried everything, from placing new datagrid elements by themselves, wrapping them in flexbox, double-wrapping them, playing with the height, max-height and overflow settings at each nested element down to the datagrid… nothing

Custom CSS as well is not doing anything - whatever I do, the datagrid expends as far as possible.

Could you please let me know if there is a fix for this one too?
Thank you very much in advance.

Hi!

Awesome features! But I have a little suggestion that can be good:

  • In Right click menu context, create an option to Hide or Show an element clicked…

With this, we can hide or show item quickly!

Thanks for all!

1 Like

It seems I have a custom CSS breaking change also. Positively however, text gradients are now working in the custom CSS property and it’s the previous work around I had using a custom HTML component to hold that style that is now not working.

Oh yes! That would be so cool! A shortcut could help also in daily editing.

1 Like

Please stay focus on adding important feature like SEO first.
Then please stop changing any critical thing like this.
I feel really tried to fixing those thing which I don’t request, again and again. :face_exhaling:

Breaking changes are annoying, but this was a pretty great update :wink:

1 Like