laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
45.76k stars 4.97k forks source link

Not possible to set 'keep note history for' accurately from the mobile app #10883

Open mrjo118 opened 2 months ago

mrjo118 commented 2 months ago

Operating system

Android

Joplin version

3.0.8

Desktop version info

Using an Android 10 device

Current behaviour

In the note history configuration screen, the 'keep note history for' option is a slider element. Even with the device rotated to landscape mode, the bar is not very long, so it is impossible to set an accurate value for it (except the min and max) without any external input devices

Expected behaviour

An alternative UI element should be used to allow accurate setting of the value. For example a textbox, as is used in the desktop version

Logs

No response

Julrob199 commented 2 months ago

I have been waiting for this for a long time 🙏

mrjo118 commented 1 month ago

Having a look at the code, if I'm understanding this correctly, it seems to be wherever an entry in builtInMetadata.ts has a type of SettingItemType.Int set, it will use the ui component where md.type === Setting.TYPE_INT in SettingComponent.tsx. I can see that for the app-mobile SettingComponent.tsx class, it uses a React Native Slider component, while in the app-desktop varient of the class, it just uses a text input with up and down buttons, but also allow entering any number as free text without validation. I would question whether we should use the Slider component at all on mobile, considering that the desktop version does not use them, and it's not just the 'keep note history for' option that it causes a problem for, but also the 'Keep notes in the trash for' option as well.

Could we not replace the slider component with a TextInput with keyboardType='numeric' (as suggested here https://stackoverflow.com/questions/32946793/react-native-textinput-that-only-accepts-numeric-characters) and then add some validation in onChanged to only allow number characters as a belt and braces if someone uses an external input device?

github-actions[bot] commented 2 weeks ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

mrjo118 commented 2 weeks ago

Still an issue