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

Add an extra dialog to ask the user whether they want to open the saved file folder when the export the entries #8567

Merged
merged 21 commits into from
Mar 28, 2022

Conversation

LingZhang22
Copy link
Contributor

Description:
Add a dialog to ask the user whether he/she wants to open the folder where they saved the file. This might be easier for the user to find the saved file.
Fixes #8195

UI:
When the users click the save button after they export the entries.
image
They can see the following dialog in the middle of the main window:
image

-If the users click the "YES" button, the saved file's folder will pop up with the saved file selected:
image

-If the users click the "NO" button, the dialog will close and nothing pops up.

Note: I deleted the checksum since it would give me an error (gradle/gradle#9361)

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

I am not that happy with a modal dialog here. Maybe you can use the popover control?

src/main/java/org/jabref/gui/exporter/ExportCommand.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/gui/exporter/ExportCommand.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/gui/exporter/ExportCommand.java Outdated Show resolved Hide resolved
.idea/runConfigurations/JabRef_Main.xml Outdated Show resolved Hide resolved
@Siedlerchr Siedlerchr added the status: changes required Pull requests that are not yet complete label Mar 14, 2022
@Siedlerchr
Copy link
Member

You should also merge in the latest changes from upstream

@LingZhang22
Copy link
Contributor Author

@Siedlerchr Thanks a lot for all your comments and guidance❤️. I have modified the code according to your suggestions. Please let me know if you have any additional suggestions.

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Tested your feature, works fine so far. Very nice!
I would reduce the time for the timer, e.g. maybe 5 seconds. 10 seconds feels a bit too long.

src/main/java/org/jabref/gui/exporter/ExportCommand.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/gui/exporter/ExportCommand.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/gui/exporter/ExportCommand.java Outdated Show resolved Hide resolved
@Siedlerchr
Copy link
Member

Can you please update the screenshots to show the current implementation?

@LingZhang22
Copy link
Contributor Author

Thanks for the review!

The current UI is as below:

Process: Click save --> Show the notification pane --> Click open in the notification pane --> Show the file in the folder
Plus: the notification pane will disappear after 5 seconds if the user doesn't take action.

For the custom theme, I used the CSS file in Custom themes to test.

Light theme:

Click Save:
image

Show NotificationPane:
image

Show file in folder:
image

Dark Theme:

Click Save:
image

Show NotificationPane:
image

Show file in folder:
image

Custom theme:

Show file in folder:
image

Show NotificationPane:
image

Show file in folder:
image

@calixtus calixtus added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes required Pull requests that are not yet complete labels Mar 28, 2022
@calixtus
Copy link
Member

I took the liberty to work a bit on this one.
This was because we already had a database notification bar, which was a total mess. So I cleaned that up and integrated your proposal into the existing notification pane. Also I fixed some style issues. There was no need to handle that explicitly in your code. I just overwrote a stupid hardcoded text color in controlsfx.

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Thanks for the initial work!

@Siedlerchr Siedlerchr merged commit 0ef029e into JabRef:main Mar 28, 2022
Siedlerchr added a commit that referenced this pull request Mar 29, 2022
* upstream/main:
  fix unit test
  Add check for developer's documentation
  Merge GitBook view
  Fix zbMath fetcher (#8623)
  GitBook: [#56] No subject
  Add an extra dialog to ask the user whether they want to open the saved file folder when the export the entries (#8567)
  Bump checkstyle from 10.0 to 10.1 (#8620)
  Bump peter-evans/create-pull-request from 3 to 4 (#8619)
  Bump pascalgn/automerge-action from 0.14.3 to 0.15.2 (#8618)
  Bump flexmark from 0.62.2 to 0.64.0 (#8621)
  Bump classgraph from 4.8.141 to 4.8.143 (#8622)
Siedlerchr added a commit that referenced this pull request Mar 30, 2022
* upstream/main: (150 commits)
  fix unit test
  Add check for developer's documentation
  Merge GitBook view
  Fix zbMath fetcher (#8623)
  GitBook: [#56] No subject
  Add an extra dialog to ask the user whether they want to open the saved file folder when the export the entries (#8567)
  Bump checkstyle from 10.0 to 10.1 (#8620)
  Bump peter-evans/create-pull-request from 3 to 4 (#8619)
  Bump pascalgn/automerge-action from 0.14.3 to 0.15.2 (#8618)
  Bump flexmark from 0.62.2 to 0.64.0 (#8621)
  Bump classgraph from 4.8.141 to 4.8.143 (#8622)
  update test getPart (#8610)
  Add ControlHelper truncateString tests comments (#8612)
  Allow using custom SSL certificates (#8583)
  Fix protectedTerms not stored due to weaklistener (#8609)
  Fix changelog and version parsing (#8578)
  Creating more unit tests for NumericFieldComparatorTest (#8604)
  Fix merge entries dialog exceeding screen size (#8599)
  StringUtilTest new test for method GetPart (#8594)
  Use unkown entry type
  ...

# Conflicts:
#	build.gradle
#	src/main/java/org/jabref/logic/pdf/search/retrieval/PdfSearcher.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display "Show in Folder" notification after exporting entries
4 participants