moodleou / moodle-mod_forumng

ForumNG forum module for Moodle
19 stars 20 forks source link

Adapt mobile code to ionic 7 #81

Open dpalou opened 1 month ago

dpalou commented 1 month ago

In this PR I'm removing the ionic3 code (the ionic5 app was released on 2021 so it should be safe to remove it).

I also created a new latest template to use the new Ionic syntax for ion-select. The old syntax still works in the 4.4 version of the app (ionic 7), but it will stop working in the 4.5 version (ionic 8) and the ion-select would be wrongly aligned without these changes. To make it easier to review the code, in the first commit I duplicate the template (no changes done in the HTML) and then I apply the changes in a new commit.

Finally, I also removed the usage of deprecated components and classes.

Important: I didn't review the CSS because there is a lot, it should be adapted to the 4.4 version of the app. The ionic 3 styles can be deleted, and ideally the ionic 5 styles should be adapted to work both in ionic 5 and ionic 7 (the ionic 7 upgrade wasn't as breaking as the ionic 5 upgrade). We recommend to avoid using ionic7 class for the ionic 7 specific styles, because in the 4.5 version of the app we'll update to ionic 8 so all styles using the ionic7 class will stop working.

Related to the above, we have plans to limit the CSS of plugins so they can only style the plugin's HTML (see MOBILE-3730). We still have to decide when will this change be applied, but we recommend that all your CSS rules only use selectors that are inside your template (e.g. avoid using selectors like "html", "body", etc. unless strictly needed), that way you won't need to change as much CSS code when MOBILE-3730 lands.

jason-platts commented 1 month ago

@dpalou Wow, thanks for this. We haven't even started the 4.4 dev work yet so you are well ahead of us. We will check these changes soon...