Tuesday, May 28, 2024
4 changes · saas-17.2
Resolved issues and error corrections
This fixes an issue where links containing non-numeric record identifiers could fail or behave incorrectly after a page reload. These identifiers are now placed in a safer part of the URL, improving reliability while preserving expected behavior for new records.
Original PR description
Before this commit, if a non-numeric active_id or resId was used, it was encoded in the path. The issue with this, is that when reloaded, the router will consider this non-numeric active_id/resId as actions, and it will don't take them into account, or it will raise an error. Now, only numeric active_id and resId are encoded in path, the alphanumeric ones are encoded in the queryString. Note that, the resId `new` is still encoded on the path, it's the only non-numeric resId allowed.
This fix ensures unread message counters in Discuss are initialized with the latest channel data, avoiding timing issues that could make counters appear incorrect during message notifications. It improves reliability for users without changing the messaging workflow.
Original PR description
The `channels.fetch()` was put inside `incrementUnreadCounter()` because it was assumed to be the only flow where the counter could change when all channels are not yet fetched, but it is also possible that the counter changes by just calling `getOrFetch()` in `_handleNotificationNewMessage()` and receiving a new counter directly from the RPC, therefore not doing the increment. In that case `initChannelsUnreadCounter` also becomes unreliable, so the force fetch is moved there instead. runbot-61556 runbot-62976
This fixes a subtle template handling issue where empty text could be saved differently after template inheritance changes. It helps avoid unnecessary differences in generated views and keeps existing templates stable when Studio customizations are applied.
Original PR description
When calling apply_inheritance_specs and moving a node (before after or inside), we merge the text content of the adjacents nodes. If the parent and target node both have no text, we should not set the text to an empty string. When a node has no text, it is serialized as follows: `<node/>` But if it has an empty string, it has the following representation: `<node></node>` In the linked PR, we now apply the studio inheritance manually, and since we use the resulting tree directly instead of parsing the result, the `remove_blank_text` option of the parser has no effect. This causes existing tests to show some difference. opw-3888345 opw-3924997
The Discuss notification settings menu now displays longer text correctly, including in languages such as Vietnamese. This prevents menu options from being cut off or misaligned when users mute channels, improving usability for multilingual teams.
Original PR description
Before this commit, the notification settings in discuss app that is used to mute channels was not showing items properly in some languages like vietnamese. This happens because the width is hard-coded to 150px as to keep the dropdown menu small. This commit fixes the issue by putting a max-width of 250px for dropdown menu and sub-menu, so that it keeps right positioning of submenu. If text is too long, it know wraps. 