Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#14: Vector graphics mode and infinite canvas #19

Merged
merged 33 commits into from
Dec 14, 2023
Merged

#14: Vector graphics mode and infinite canvas #19

merged 33 commits into from
Dec 14, 2023

Conversation

shubertm
Copy link
Member

@shubertm shubertm commented Oct 5, 2023

@shubertm shubertm requested a review from kirillt October 5, 2023 10:07
# Conflicts:
#	app/build.gradle
#	app/src/main/java/space/taran/arkmemo/App.kt
#	app/src/main/java/space/taran/arkmemo/data/repositories/TextNotesRepository.kt
#	app/src/main/java/space/taran/arkmemo/data/viewmodels/EditTextNotesViewModel.kt
#	app/src/main/java/space/taran/arkmemo/files/FilePicker.kt
#	app/src/main/java/space/taran/arkmemo/preferences/MemoPreferences.kt
#	app/src/main/java/space/taran/arkmemo/ui/activities/MainActivity.kt
#	app/src/main/java/space/taran/arkmemo/ui/fragments/EditTextNotesFragment.kt
#	app/src/main/java/space/taran/arkmemo/ui/fragments/SettingsFragment.kt
# Conflicts:
#	app/src/main/java/space/taran/arkmemo/data/repositories/TextNotesRepo.kt
#	app/src/main/java/space/taran/arkmemo/preferences/MemoPreferences.kt
#	app/src/main/java/space/taran/arkmemo/ui/activities/MainActivity.kt
#	app/src/main/java/space/taran/arkmemo/ui/viewmodels/NotesViewModel.kt
@tuancoltech
Copy link
Collaborator

@ShubertMunthali I believe there are build errors at the moment in this branch (as below).
Please resolve them.

Screenshot 2023-11-10 at 21 16 00

Screenshot 2023-11-10 at 21 17 10

Comment on lines 89 to 93
val pointList = point.split(COMMA)
val x = pointList[0].toFloat();
val y = pointList[1].toFloat()
Log.d("svg-utils", "move to $point")
commandsString = commandsString.removePrefix("$SPACE$MOVE_TO$SPACE$point")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pay attention to these lint issues.

Screenshot 2023-11-10 at 21 25 20

Comment on lines 60 to 61
val title = propertiesStorage.getProperties(id).titles.let {
if (it.isNotEmpty()) it.elementAt(0) else throw NoteTitlesException()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShubertMunthali This is not backward-compatible with previous app version.
That means, when there're existing notes which do not have any title, there will be a crash.
Thrown exception should be handled more elegantly in this case.

Screenshot 2023-12-05 at 07 43 21

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not throw exception? Then we can get the title from content, that's what old Memo did

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not throw exception? Then we can get the title from content, that's what old Memo did

@ShubertMunthali If we throw it here, we should catch and handle it from the caller side, to avoid crash.
It's your call to decide it should be thrown out here or not, but IMHO there's no need to throw an exception here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok, we will handle backward notes there

@tuancoltech
Copy link
Collaborator

Screenshot 2023-12-05 at 07 49 07

@ShubertMunthali Relating to UI/UX, I find the current 2 FABs quite boring when they stack on top of each other, as that occupies more screen space.
What do you think about this grouping UI instead?
https://www.geeksforgeeks.org/extended-floating-action-button-in-android-with-example/

@tuancoltech
Copy link
Collaborator

tuancoltech commented Dec 5, 2023

When I edited a graphic note's title, it says Note already exists.
https://recordit.co/M4LQXvZT1S

It seems to be related to the special characters in the title, since I can reproduce that even with text note: https://recordit.co/qTpKM0jh1h

if (!isResumed) return@observe

if (it == SaveNoteResult.SUCCESS) {
toast(requireContext(), getString(R.string.ark_memo_note_saved))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co-authored-by: Tuan Nguyen <tuancoltech@gmail.com>
@shubertm
Copy link
Member Author

shubertm commented Dec 5, 2023

When I edited a graphic note's title, it says Note already exists.
https://recordit.co/M4LQXvZT1S

It seems to be related to the special characters in the title, since I can reproduce that even with text note: https://recordit.co/qTpKM0jh1h

@tuancoltech I understand the problem here. I will create new issue to describe how we should solve that bug or it should be solved in #22. I will add description there

@shubertm
Copy link
Member Author

shubertm commented Dec 5, 2023

Screenshot 2023-12-05 at 07 49 07

@ShubertMunthali Relating to UI/UX, I find the current 2 FABs quite boring when they stack on top of each other, as that occupies more screen space.
What do you think about this grouping UI instead?
https://www.geeksforgeeks.org/extended-floating-action-button-in-android-with-example/

Looks pretty awesome. If we have some better options we should consider too. I like this at the moment. Cleans UI indeed :)

Copy link
Collaborator

@tuancoltech tuancoltech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.
Thanks.

@tuancoltech
Copy link
Collaborator

tuancoltech commented Dec 6, 2023

@ShubertMunthali Sorry, I missed this.
The color scheme of the FAB doesn't seem to match our current theme color.
Can you update it please?

Screenshot 2023-12-06 at 22 35 27 You mean all the fabs should be blue as well? Am not really sure but I guess there will be a special UI design later, that will consider all the themes. And just a suggestion, I think it will be better to specialize a task for that, it should tackle all the app UI/UX

@kirillt
Copy link
Member

kirillt commented Dec 14, 2023

@tuancoltech good observation about colors, but yes we'll work on it separately.

@kirillt kirillt merged commit 34caf6c into main Dec 14, 2023
1 check passed
@kirillt kirillt deleted the graphic-notes branch December 16, 2023 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants