- Use dependency injection and Get.find instead of manual singleton pattern
- Move from domain to data layer
- Prevents multiple API calls if the previous request hasn't finished
Previosuly, we display Scribe mobile (bottomsheet) if platform was mobile, so also Android or iOS tablet.
Now we choose to display Scribe mobile relatively to display screens instead of platform to display the desktop Scribe (context menu) for tablets.
Same features than Scribe desktop but as a full screen modal instead of a context menu.
Reuse menu and submenu components.
Reuse suggestion components.
Reuse 99% of Scribe desktop style.
Scribe is always composed of menu (aka category) and submenu (aka action) :
- submenu item UI was already in an UI only component. I moved it to items folder.
- menu item UI was mixed in a component with desktop related UX. So I extract the UI to create an UI only component. I moved it also to items folder.
In Scribe desktop, the suggestion is displayed in a popup.
In Scribe mobile, it will be displayed in a full screen modal.
But it share the same logic about loading, success and error.
So here I extract this logic and use it in the AI Scribe desktop to be able to use it later in AI Scribe mobile.