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

PAINTROID-455 Add Color Picker #40

Merged
merged 46 commits into from
Aug 16, 2024

Conversation

bhav-khurana
Copy link
Contributor

@bhav-khurana bhav-khurana commented Dec 28, 2023

Ticket

PAINTROID 455

New Features and Enhancements

Added the functionality to choose from a set of defined colors, adjust the alpha value.
Implemented a custom color picker as a separate module

Checklist

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the #paintroid Slack channel and ask for a code reviewer

@bhav-khurana bhav-khurana changed the title PAINTROID-702 PAINTROID-702 Add Color Picker Dec 28, 2023
@bhav-khurana
Copy link
Contributor Author

@juliajulie95 @bakicelebi Can you please suggest any possible changes?

@juliajulie95
Copy link
Contributor

Hi!
Thanks for your interest in the project, but this ticket duplicates one we already have:
https://jira.catrob.at/browse/PAINTROID-455
If you want to contribute, check out this ticket and adjust your color picker :)
Minimal design changes from the old design are okay, but we need the functionality to be the same

@bhav-khurana
Copy link
Contributor Author

Sure! I will look into the ticket and adjust it as required.

@bhav-khurana
Copy link
Contributor Author

@juliajulie95 Should the design and look of the color picker be same as in the original app? There's a similar design based on the flutter_colorpicker package.

image

Can I integrate this in the app?

@juliajulie95
Copy link
Contributor

The color picker will also be used in our other apps so we would like to implement it oursselves instead of being dependent on other libraries :)

@bhav-khurana
Copy link
Contributor Author

Okay sure! Will try to implement the color picker as per the requirements

@bhav-khurana
Copy link
Contributor Author

@juliajulie95 I have made a colorpicker package and used in the code as required. Can you please review?

@juliajulie95
Copy link
Contributor

Please rename the PR to PAINTROID-455 so it gets tracked on our jira board

@bhav-khurana bhav-khurana changed the title PAINTROID-702 Add Color Picker PAINTROID-455 Add Color Picker Jan 21, 2024
@bhav-khurana
Copy link
Contributor Author

@juliajulie95 I have renamed the PR as required

@juliajulie95
Copy link
Contributor

Please resolve your conflicts :)

@bhav-khurana
Copy link
Contributor Author

@juliajulie95 I have resolved the conflicts. Please have a look

@bhav-khurana
Copy link
Contributor Author

@juliajulie95 Are there any other changes required?

@juliajulie95
Copy link
Contributor

@bhav-khurana Thank you!
Your ticket is currently waiting for Coder review, after that I will review and merge if accepted.
Thank you for your patience, as we are still a small team of developers/students and are not working full-time at Catrobat.

@bhav-khurana
Copy link
Contributor Author

Okay, thank you so much!

@msesko
Copy link
Contributor

msesko commented Feb 17, 2024

@juliajulie95 should this be a separate package or do we just put it in tools? There is not that much code so that is not the issue. I am just not sure if it is considered a tools or something else.

@msesko
Copy link
Contributor

msesko commented Feb 18, 2024

@juliajulie95 should this be a separate package or do we just put it in tools? There is not that much code so that is not the issue. I am just not sure if it is considered a tools or something else.

-> seperate package is good: we also need to build it seperately for the PocketCode app

@bhav-khurana
Copy link
Contributor Author

@juliajulie95 should this be a separate package or do we just put it in tools? There is not that much code so that is not the issue. I am just not sure if it is considered a tools or something else.

-> seperate package is good: we also need to build it seperately for the PocketCode app

Yes I think it should be in a separate package only as it is in the original app.. we can add more functionalities to the colorpicker in future too

Copy link
Contributor

@msesko msesko left a comment

Choose a reason for hiding this comment

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

@bhav-khurana Good job on coding. Please check my requested changes in comments. Hopefully they make sense :). Also resolve conflicts with develop if there are any.

packages/colorpicker/.gitignore Outdated Show resolved Hide resolved
packages/colorpicker/CHANGELOG.md Outdated Show resolved Hide resolved
packages/colorpicker/LICENSE Outdated Show resolved Hide resolved
packages/colorpicker/README.md Outdated Show resolved Hide resolved
packages/colorpicker/analysis_options.yaml Outdated Show resolved Hide resolved
pubspec.yaml Show resolved Hide resolved
packages/colorpicker/pubspec.yaml Outdated Show resolved Hide resolved
packages/colorpicker/pubspec.yaml Outdated Show resolved Hide resolved
packages/colorpicker/assets/img/checkerboard.png Outdated Show resolved Hide resolved
packages/colorpicker/lib/widgets/color_compare.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@msesko msesko left a comment

Choose a reason for hiding this comment

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

Hi, bhav. Tested on iOS, works good. Please just do this one fix I commented and then we should be good to do a QA review :)

Copy link
Contributor

@msesko msesko left a comment

Choose a reason for hiding this comment

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

Good.

@juliajulie95
Copy link
Contributor

Hi @bhav-khurana
Looks very good.
One issue I found is, when I go into the colorpicker the first color is selected immediately.
When opening the current color should be selected until the user selects another color.
So opening the colorpicker and hitting "Apply" without tapping any color, should result in having the same color selected as before opening the color picker
Please ping me when this is done

@juliajulie95
Copy link
Contributor

A second issue I found:
When I paint with opacity the opacity changes when doing the next stroke
Let me know if you can't reproduce and need videos

@bhav-khurana
Copy link
Contributor Author

Hi @juliajulie95
I have resolved the first issue but I'm not really sure of why the latter still persists, I can reproduce the same and even tried debugging it; maybe the old instance gets overwritten or something like that

@msesko
Copy link
Contributor

msesko commented Jun 5, 2024

A second issue I found: When I paint with opacity the opacity changes when doing the next stroke Let me know if you can't reproduce and need videos

This is something I have also pointed out before.

@juliajulie95
Copy link
Contributor

juliajulie95 commented Jun 5, 2024

Please resolve the conflicts.
Please check that if you do make get/all etc. then it also does that for the colorpicker module
We already had that before the restructure, you can check on how to do that there
For the bug, i think we will merge it like that and I will create a bug ticket for that

@juliajulie95
Copy link
Contributor

Seems like it doesn't work anymore.
Please also add tests for the functionality

@bhav-khurana
Copy link
Contributor Author

@juliajulie95
Which tests are you talking about? Tests for color and opacity updates have already been added

@juliajulie95
Copy link
Contributor

For example tests for the problem with the opacity changing on the next stroke :)

@juliajulie95
Copy link
Contributor

juliajulie95 commented Jul 22, 2024

Please resolve the conflicts
There are still a few issues with opacity, but I would create a bug ticket for those.

  • Opacity changing after finishing the current stroke and when next stroke is started
  • Opacity changing does not work if you do not change the color in the dialog
  • Opacity slider is always on max opacity if you return to the dialog even with a color with opacity

@juliajulie95 juliajulie95 merged commit ae20a51 into Catrobat:develop Aug 16, 2024
1 check passed
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.

4 participants