amwebexpert / poc-mobile-python

Python multi-platform app using the KivyMD framework, integrating Artificial Intelligence features.
MIT License
8 stars 3 forks source link

feat: settings menu - added paste button for api keys and edited text… #16

Closed costa-rica closed 11 months ago

costa-rica commented 11 months ago

…_hint for iOS because default text_hint too long

This is response to issue #15. The solution creates a button in the settings menu for users to paste in the API key MDTextFields.

Description

This solution replaces the MDTextField with a MDBoxLayout that has the MDTextField and an MDIconButton. Also, the text_hint was too long for iOS devices when the button is added, so I shortened the text when the app is run on an ios device.

I think in the future we might be able to create TextField that responds to user pressing and holding in order to paste as other native devices, but this is an ok solution for the moment.

You can view the solution from building this branch on Xcode and running it on the simulator. This will show the shortening of the text_hint.

Here is a vide/gif of this pull request solution: OM_with_pasteButton(2)

Suggestion

One thing we might want to consider is removing the redundancy in the labeling in the settings menu. Honestly, not sure what to remove, but my instinct is there are too many labels. I'm leaning towards either the MDLabel or the helper_text should be removed for iOS devices. In Python with the big screen, I think it looks good as it is. But in the iPhone it seems a little cluttered and maybe even confusing.