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

Better feedback for changes in the new settings widget #38799

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jhaigh0
Copy link
Contributor

@jhaigh0 jhaigh0 commented Feb 7, 2025

Description of work

It was requested that the 'Apply' button on the new settings widget is greyed out when the user has made no changes to the settings, and enabled when there is a pending change.

The other thing I discovered in this PR is that the test files that were added in the original PR (#38373) were not added to cmake so haven't been running. I thought the search for missing pytest files pre-commit job was supposed to flag this. They've been added in this PR (along with new tests).

Summary of work

Design-wise I thought it best that the model of the settings widget tabs didn't know about the presenter. Instead, the presenter emits a signal when it adds a change in the model which is picked up by the parent presenter. For this I added a QObject base class of the presenters.

There is no associated issue.

Further detail of work

To test:

Play around in the settings widget, change settings and change them back again. 'Apply' button should enable and disable as you expect.


Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@jhaigh0 jhaigh0 added the ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS label Feb 7, 2025
@jhaigh0 jhaigh0 added this to the Release 6.13 milestone Feb 7, 2025
@jhaigh0 jhaigh0 force-pushed the better_feedback_on_setting_apply_button branch from e8de202 to 65694fa Compare February 7, 2025 14:24
@jhaigh0 jhaigh0 force-pushed the better_feedback_on_setting_apply_button branch from 65694fa to cf92efb Compare February 10, 2025 14:56
@jhaigh0 jhaigh0 marked this pull request as ready for review February 10, 2025 15:43
@cailafinn cailafinn self-assigned this Feb 21, 2025
@cailafinn
Copy link
Contributor

cailafinn commented Feb 21, 2025

I thought the search for missing pytest files pre-commit job was supposed to flag this.

To answer this, the precommit hook relies on searching for a call to unittest.main(), which it seems like these files are missing. Normally CMake catches this, but if they're the only test files in the directory, I think CMake overlooks them. Might be worth investigating this further and modifying the hook to account for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISIS Team: Core Issue and pull requests managed by the Core subteam at ISIS
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants