Skip to content

AddShow/Hide preview in filters windows to compare with and without the effectΒ #554

Closed

Description

@Lulu04

It will be nice to add a 'preview' checkbox in the filters windows to allow to see the image with or without the effect. User can compare the two and have a better experience while adjusting the parameters.
My proposal is:

  • preview checkbox is always checked when user open a filter window.
  • preview is checked: the image/layer is modified by the filter.
  • preview is unchecked: the image/layer return to its original state.
  • if user click the OK button while preview is unchecked, the effect is not applyed: I think this behavior is better for user experience (not sure)

Activity

  1. circular17 commented on Sep 8, 2023

    @circular17
    Collaborator

    That's good idea. I agree that the checkbox would checked by default. About the OK button, I would rather imagine that the effect would be applied (would be choosing without preview). The user can always choose Cancel to not apply.

  2. Lulu04 commented on Sep 8, 2023

    @Lulu04
    CollaboratorAuthor

    Ok, 'OK' button will always apply the effect regardless of the preview checkbox state.
    I've never contributed to another repository than mine, so I need some guidance please.
    I've done:

    • forked lazpaint repo in my github account
    • cloned the forked repo to my local computer
    • created a branch 'ShowHidePreview_dev' and started to include the preview checkbox on some filters.

    When it will be terminated and tested, I will push the changes on 'ShowHidePreview_dev' branch to my repo.
    all good so far?

  3. circular17 commented on Sep 8, 2023

    @circular17
    Collaborator

    Hi Lulu,

    You 're almost there! Your changes will be merged ultimately into dev-lazpaint branch, it is a branch inside lazpaint repository. So your branch ShowHidePreview_dev need to be derived from dev-lazpaint branch instead of master.

    To do that, go to the main page of your forked repository, click on Branch then See all branches. There, you have a button to add a new branch. It pops a dialog. There, choose the source to be bgrabitmap/lazpaint repository and select the branch called dev-lazpaint.

    I suggest to give a name that looks a bit similar, like dev-showhidepreview.

    One you've setup your branch, you can commit and push the changes as you go. Your git branch acts like an archive of your code.

    If there's anything unclear or if you have further questions, please don't hesitate to ask. I'm here to help!

  4. Lulu04 commented on Sep 8, 2023

    @Lulu04
    CollaboratorAuthor

    Ok done.
    I notice the LCLVersion in your lfm file is 1.6.0.4, mine is 2.2.4.0.
    Just out of curiosity, does this mean that you are using Lazarus 1.6 to develop Lazpaint ?

    EDIT
    I've done the preview on Pixelate filter and pushed 2 commits on my git branch (one for the 'Preview' entry in UResourceStrings and another for the Pixelate dialog).
    But I don't think I did it right because the pull request says:
    Lulu04 want to merge 2 commits into bgrabitmap:master from Lulu04: dev-showhidepreview
    The target should be bgrabitmap:dev-lazpaint instead...
    I don't know what to do...

  5. circular17 commented on Sep 8, 2023

    @circular17
    Collaborator

    Great! It seems now indeed that your dev branch stems from dev-lazpaint. Though as you have noticed, GitHub proposes to merge into bgrabitmap/master branch. I have changed it in the pull request. If you ever have this situation, here's how. This can be done by using the Edit button at the top of the request. Not only can you change the title, but also the destination branch.

    About the version of the LFM file, indeed this is an old version of Lazarus. It means that the last time I changed this file using Lazarus, the version I was using was 1.6. So this windows has not been changed for a long time!

    I will review the change in the pull request. Thank you for your involvement!

  6. Lulu04 commented on Sep 9, 2023

    @Lulu04
    CollaboratorAuthor

    So you received the pull request. It reassures me that you can modify it on your side! :)
    Last evening I was feeling a bit lost with all this git stuff... with some practice and your guidance it will be better in the future!
    Thank you for taking the time to explain.

    Can I continue with another filter or I have to wait your validation for the first ?

  7. circular17 commented on Sep 9, 2023

    @circular17
    Collaborator

    I sympathize, it is indeed a bit complicated to handle branches with Git. That's perfectly normal to be lost at the beginning about it. I am glad to answer your questions. Over time you will indeed get used to the quirks.

    Validation is done at the pull request level. We can either keep using the same pull request for other windows and in the end merge together. Or we can merge this change which I think would be a good idea: you will have confirmation that is all is well with your development.

    For this first filter, so, I suggest for you to wait my validation before pushing your changes. You can still continue to implement for other filters locally on your computer though if you feel like going forward.

    Please look at the comments I've made on the pull request so that we can merge it. Thank you for your patience with the merge process!

  8. circular17 commented on Sep 9, 2023

    @circular17
    Collaborator

    Pull request link: #556

  9. Lulu04 commented on Sep 12, 2023

    @Lulu04
    CollaboratorAuthor

    Hi, I'm happy the first filter is merged!
    Let's continue! Can I send several filters on the same pull request?
    Can we still use this branch? (if I understand correctly the answer is yes?)

  10. circular17 commented on Sep 12, 2023

    @circular17
    Collaborator

    Hi Lulu! Let's celebrate πŸ‘
    Sure you can send several filters in the same pull request and keep the same branch. In fact that would make sense indeed given the name given to it.
    When you're satisfied with a chunk of changes, you can make a new pull requests.

  11. Lulu04 commented on Sep 12, 2023

    @Lulu04
    CollaboratorAuthor

    arf... Another github mistake... I send the others change in another pull request #558
    very sorry...
    edit: I think I was sorry for nothing, may be its normal the pull request number change because it's not the same!
    OMG, I'll get there one day! πŸ˜„

  12. circular17 commented on Sep 12, 2023

    @circular17
    Collaborator

    Hi Lulu! It is normal that the number would change, that's not to worry about. I understand your frustration each step of the way but you're getting there.

  13. circular17 commented on Sep 18, 2023

    @circular17
    Collaborator

    All the filter windows in the Filter menu now have the Preview checkbox. Well done!

    I noticed that the Posterize window under the Color menu has it too. As for other windows of this menu, while having a Preview checkbox could be a beneficial, it's not as crucial. We can consider it in our future iterations.

  14. Lulu04 commented on Sep 18, 2023

    @Lulu04
    CollaboratorAuthor

    Hi Circular, I've applied the preview to the Posterize window because it's units are located in dialog/filter. I didn't realize that this tool is in the Colors menu.

  15. circular17 commented on Sep 18, 2023

    @circular17
    Collaborator

    Ok. I suppose it was originally with other filters and later I thought that it was more of a color thing, so move it to the other menu.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions