Skip to content

colored notes#174

Draft
Rikul wants to merge 1 commit intomaltaisn:masterfrom
Rikul:colored-notes-pr
Draft

colored notes#174
Rikul wants to merge 1 commit intomaltaisn:masterfrom
Rikul:colored-notes-pr

Conversation

@Rikul
Copy link

@Rikul Rikul commented Feb 6, 2026

No description provided.

@maltaisn
Copy link
Owner

I've tested it quickly and it works. However, there are many issues I'd like to be fixed before this gets merged.

I suspect this has been done largely with the help of AI, yet you haven't mentioned it. In fact, both the PR and the (single!) commit have no description.

Are you willing to make several improvements? Or is this just a feature you made for yourself and thought of contributing back?

@Rikul
Copy link
Author

Rikul commented Feb 17, 2026

@maltaisn Yes, it's done with AI help for a personal project. I don't have the time right now to make changes. Please change it around to get it merged.

@maltaisn
Copy link
Owner

This is your PR, if you want it merged you can make the changes. I'll do a review when/if you have time.

@Rikul
Copy link
Author

Rikul commented Feb 17, 2026

@maltaisn What are the issues you wanted fixed? I will try to fix them.

@Rikul Rikul marked this pull request as draft February 17, 2026 18:53

/**
* Status of the note, i.e. its location in the user interface.
* Note status, i.e. its location in the user interface.
Copy link
Owner

Choose a reason for hiding this comment

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

Why was this changed?

Copy link
Author

Choose a reason for hiding this comment

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

dont know but i'll revert it

* 0 is the default color.
*/
@ColumnInfo(name = "color", defaultValue = "0")
val color: Int = 0,
Copy link
Owner

Choose a reason for hiding this comment

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

I would prefer the color to be an enum rather than an int. Int is meant more to represent integer numerical quantities.

Copy link
Author

Choose a reason for hiding this comment

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

ok will fix it

* Notes with [status] set to [NoteStatus.ACTIVE] should be pinned or unpinned.
* Other notes should be set to [PinnedStatus.CANT_PIN].
*/

Copy link
Owner

Choose a reason for hiding this comment

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

Why the blank line?

}

debugRequire(status != NoteStatus.DELETED || reminder == null) {
require(status != NoteStatus.DELETED || reminder == null) {
Copy link
Owner

Choose a reason for hiding this comment

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

Why were these changed to require? This applies at other locations too.

Copy link
Author

Choose a reason for hiding this comment

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

I'll revert them

R.string.action_share,
R.drawable.ic_share,
true,
false,
Copy link
Owner

Choose a reason for hiding this comment

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

You add one action but 3 actions that could be shown in toolbar now can't. Why?

Copy link
Author

Choose a reason for hiding this comment

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

I changed it because I was having trouble running tests, but I'll undo the changes to the existing toolbar buttons

<color name="note_color_3">#2C2A3E</color>
<color name="note_color_4">#2A3B2E</color>
<color name="note_color_5">#3D2E29</color>
</resources>
Copy link
Owner

Choose a reason for hiding this comment

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

The colors look fine when used as a background, but they don't in the color picker:

Image

The same is true in dark theme. I would prefer to show colors at higher saturation in the picker.

Copy link
Author

Choose a reason for hiding this comment

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

I'll change the colors

android:focusable="true"
android:contentDescription="@string/action_none" />

<Space android:layout_width="16dp" android:layout_height="0dp" />
Copy link
Owner

Choose a reason for hiding this comment

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

Using Space is very antiquated. If you change to constraint layout you won't need it anymore.

<dimen name="input_dialog_title_min_height">420dp</dimen>

<integer name="edit_actions_in_toolbar">5</integer>
<integer name="edit_actions_in_toolbar">8</integer>
Copy link
Owner

Choose a reason for hiding this comment

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

This explains why the toolbar was so crowded. This change is not related to adding colors.

Copy link
Author

Choose a reason for hiding this comment

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

i'll revert it

<item name="android:minWidth">@dimen/toolbar_action_button_min_width</item>
<item name="android:paddingStart">@dimen/toolbar_action_button_padding_horizontal</item>
<item name="android:paddingEnd">@dimen/toolbar_action_button_padding_horizontal</item>
</style>
Copy link
Owner

Choose a reason for hiding this comment

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

What does this do and why was it changed? It's not related to colors.

Copy link
Author

Choose a reason for hiding this comment

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

i'll remove it


companion object {
private const val KEY_SELECTED_COLOR = "selected_color"
const val TAG = "color_picker_dialog"
Copy link
Owner

Choose a reason for hiding this comment

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

Nitpick: parent fragments should be responsible for setting the tag. For example a fragment could have multiple color picker fragments and use the tag to differentiate them, like it is the case with confirm dialog currently.

@maltaisn
Copy link
Owner

maltaisn commented Feb 23, 2026

General comments:

  • Please read the contributing section: https://github.com/maltaisn/another-notes-app?tab=readme-ov-file#contributing
  • Split the changes into multiple commits. There are many changes which are not at all related to adding color support, these shouldn't be in the same commit.
  • Add a commit description to rationale for changing things when not immediately evident.
  • Link the PR with the associated issue.
  • Target the dev branch, not master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants