cph-cachet / research.package

A Flutter package implementing support for surveys like ResearchStack and ResearchKit
MIT License
51 stars 44 forks source link

Remove `simple_html_css` #117

Closed SlimShadyIAm closed 6 months ago

SlimShadyIAm commented 6 months ago

The simple_html_css package caused build issues when using Flutter 3.22 because the Flutter team renamed some text styling properties the package used. Although this issue has been fixed in v5.0.0 of the package, it seems that the code that required simple_html_css is not called anywhere, so this package can be removed.

The alternative is upgrading the simple_html_css to 5.0.0, but then we need to make the research package use Flutter 3.22 as a minimum as well as any project that depends on it.

Closes #115

albermoon commented 6 months ago

Deleted the package and the widget which used the package are the best option if is unused and it didn't make sense to keep them in the project

SlimShadyIAm commented 6 months ago

As far as I can see, the removed InstructionText widget was previously used to render text within the RPUIInstructionStep:

https://github.com/cph-cachet/research.package/blob/5e7eedf4468f9c2de40669404ce090460c7cf92f/lib/src/ui/RPUIInstructionStep.dart#L59-L61

However, currently on master it is rendered using the Text widget:

https://github.com/cph-cachet/research.package/blob/f8dcd7968a3f0477a408bfd6c35448ab00ccf785/lib/src/ui/instruction_step.dart#L62-L66


Similarly for the removed Title widget, when it was added:

https://github.com/cph-cachet/research.package/blob/5e7eedf4468f9c2de40669404ce090460c7cf92f/lib/src/ui/RPUIQuestionStep.dart#L89

vs. on master: https://github.com/cph-cachet/research.package/blob/f8dcd7968a3f0477a408bfd6c35448ab00ccf785/lib/src/ui/question_step.dart#L141-L145

bardram commented 6 months ago

However, currently on master it is rendered using the Text widget:

This makes sense - we can't translate HTML code so support for HTML can/should be removed.