victoreronmosele / flutter_gradient_generator

An online tool for creating and customizing gradients for use in Flutter applications.
https://fluttergradientgenerator.com
GNU General Public License v3.0
21 stars 5 forks source link

Store the color pallete states #74

Open maheshj01 opened 7 months ago

maheshj01 commented 7 months ago

Storing the states would allow the undo-redo feature to be able to switch between states and also compare between color palettes. To give you more context. I created a color palette and then hit Random and now I have no way to switch back.

Proposed solution:

  1. The app should show the list of states (ListView), clicking each listItem should switch to that state.
  2. This should also be binded with keyboard shortcuts for undo (ctrl+z) and redo (ctrl+shift+z)
  3. User should have option to clear the entire state (list) or a specific element in the list.
victoreronmosele commented 7 months ago

Thanks @maheshmnj. I agree and would like to have this feature in the project.

Can you describe some more how you imagine the flow to be?

maheshj01 commented 7 months ago

@victoreronmosele I have updated the description. I will see if I can contribute to this feature later this week.

maheshj01 commented 7 months ago

I implemented this log history today to one of my app https://pastelog.netlify.app/ hopefully it gives you an idea

victoreronmosele commented 7 months ago

Thanks!

Your implementation of the state history on https://pastelog.netlify.app/ looks great!

I also like the idea for the keybindings.

I'm currently working on https://github.com/victoreronmosele/flutter_gradient_generator/issues/73 locally and I'll look deeper into this in a few days.

victoreronmosele commented 6 months ago

@maheshmnj, I just merged in a UI update via https://github.com/victoreronmosele/flutter_gradient_generator/pull/75, and I added a toolbar that will contain undo and redo state buttons.

I'll do some work on this and share a preview soon.

I'll also appreciate some feedback on the UI update. See demo here: https://github.com/victoreronmosele/flutter_gradient_generator/pull/75#issue-2128576034.

maheshj01 commented 6 months ago

@victoreronmosele The UI looks great!

I have a few additonal improvements to suggest

  1. Clicking on black app bar reloads the app
  2. There seems some issue with the text rendering
image
victoreronmosele commented 6 months ago

@maheshmnj, thanks for the review and suggestions. 🙌🏽

I'll work on fixes for the issues.

victoreronmosele commented 6 months ago

Added the fix for the empty space reloading the app.

The text rendering bug isn't so clear to me.

victoreronmosele commented 6 months ago

@maheshmnj here's the current progress (undo and redo):

https://github.com/victoreronmosele/flutter_gradient_generator/assets/19398044/44f6ae38-3c3c-45bf-ae30-e7201eae9ebb

Preview URL: https://flutter-gradient-generator--pr79-state-history-pnd1e08v.web.app/ PR: https://github.com/victoreronmosele/flutter_gradient_generator/pull/79

Adding the version history next.

maheshj01 commented 6 months ago

Looks great!