88
Views
3
Comments
[OutSystems UI] Bug when orientation change on mobile
outsystems-ui
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

I think i found a bug when creating a new mobile app with OutsystemsUI.

It create two default layouts (Layout and LayoutBlank) with OnReady and OnDestroy events.

Both seems to be problematic.

After each navigation using the layouts, the OnReady/OnDestroy actions are triggered causign some issues.

  • AddFavicon - Since it is a SPA, the add favicon keeps stacking unnecessary favicon tags after every navigation. (this severely degrades the performance of the application after while)

  • LayoutReady - This event calls the 'LayoutReady' action from OutsystemsUI, that subscribes to the OrientationChange event in order to update the viewport.

    In OnDestroy the 'LayoutDestroy' action gets call unsubscribing it.

    The issue is that LayoutReady function only subscribes the first time since it checks window.applicationStarted, and since the aplication is an SPA, all subsequente navigation will not subscribe to the OrientationChange event anymore, because the application is already started.

I'm not sure if i'm misusing those layout, but it seem that their are setup assuming that the page will reload after every navigation.


2022-01-13 11-39-41
Bernardo Cardoso
Staff

Hi @Matheus Medeiros,

Thanks for the report!

  • We already created a task on our side to review the OrientationChange logic (ROU-4327).
  • About the Favicon, as it is an isolated Client Action called on the Template, it's expected to be handled by the developers. That being said, we will review it internally, to check if it makes sense to change the way its being used.


Best regards,

Bernardo Cardoso

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Matheus Medeiros 

First of all thanks for the feedback.
Could you please share a sample oml with steps to reproduce where we could see several favicon tags? I created a quick test with 4screens and navigated between them, used the back button, opened new tabs, and used reload and I always get only one tag, not being able to reproduce this part of your report.
Could you also mention the OS UI version you're using?
Thanks in advance.

Cheers,
GM


2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Matheus Medeiros 

Any feedback on my previous comment? That would be really useful in order to identify the scenario you mentioned.

Cheers,
GM

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.