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

Show preview also for available styles #8110

Merged
merged 11 commits into from
Oct 6, 2021
Merged

Show preview also for available styles #8110

merged 11 commits into from
Oct 6, 2021

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Sep 30, 2021

Fixes #8108

Theoretically works, but not when the right side (chosen styles) is empty

Now includes a search
grafik

  • 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.

@Siedlerchr Siedlerchr changed the title WIP: Show preview also for avaiable styles WIP: Show preview also for available styles Oct 1, 2021
@ThiloteE
Copy link
Member

ThiloteE commented Oct 1, 2021

Since you are at it, while looking at the code in the preview style, have you seen something that would explain #7860?

@Siedlerchr
Copy link
Member Author

@ThiloteE
I encountered that as well. It has to do with the Edit-Field (coming from the richtextfx library) and the syntax highlighting feature. Did not yet find out why exactly it's happening. It seems to be coming when you don't have anything selected at all, e.g the list is empty At least that triggered it a few times

If you want to try this version, you can check the build here https://builds.jabref.org/pull/8110/merge/

@ThiloteE
Copy link
Member

ThiloteE commented Oct 1, 2021

The searchbar is wonderful though!!

@Siedlerchr Siedlerchr changed the title WIP: Show preview also for available styles Show preview also for available styles Oct 2, 2021
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Oct 2, 2021
@Siedlerchr
Copy link
Member Author

The index exception comes from the Richtextfx library and I think this is also why there is no preview shown when the right side is empty.

@Siedlerchr
Copy link
Member Author

I maybe have an idea for the index exception, reminder to myself, test deleting/null setting the content before replacing with new style content

remove uncessary listener
@Siedlerchr
Copy link
Member Author

I could not fix the issue with the index out of bounds need to wait for the new release of the richtextfx stuff.
However, now the preview is also shown even if you don't have any selected on the right side

this.viewModel = new PreviewTabViewModel(dialogService, preferencesService, taskExecutor, stateManager);

filteredPreviews = new FilteredList<>(viewModel.availableListProperty());
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be in the viewModel?

Copy link
Member Author

Choose a reason for hiding this comment

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

I adapted this from the Journal Tab...

Copy link
Member

Choose a reason for hiding this comment

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

I'm flattered that you think my code is perfect, as I am... 😅 But I am still only human

Siedlerchr and others added 5 commits October 4, 2021 19:57
* upstream/main:
  Don't throw exception when validating invalid paths (#8112)
  Bump jackson-dataformat-yaml from 2.12.5 to 2.13.0
  Bump jackson-datatype-jsr310 from 2.12.5 to 2.13.0
  Bump byte-buddy-parent from 1.11.15 to 1.11.18
  Bump classgraph from 4.8.116 to 4.8.121
  Bump checkstyle from 9.0 to 9.0.1
  remove iso charset, website returns utf8 for icar comp sci only returns one result
  fix springer fetcher Fix computer science fetcher
  Squashed 'buildres/csl/csl-locales/' changes from 7a507fc008..495f888637
  Squashed 'buildres/csl/csl-styles/' changes from 5facb37..3b00357
  Update CHANGELOG.md
  snap: Use lzo compression & switch to core20 base
…eviewAvaiableStyles

* upstream/previewAvaiableStyles:
  Fixed typos
@calixtus calixtus merged commit 74b5852 into main Oct 6, 2021
@calixtus calixtus deleted the previewAvaiableStyles branch October 6, 2021 19:30
Siedlerchr added a commit that referenced this pull request Oct 10, 2021
* upstream/main: (149 commits)
  Add Tutorials for javafx
  lint
  Add changelot
  Open folder on mac and highlight file
  Add Tests to DoiCleanup (#8124)
  Improve Drag and Drop in Custom Entry types dialog (#8121)
  Show preview also for available styles (#8110)
  udpate to javafx 17.0.0.1
  Don't throw exception when validating invalid paths (#8112)
  Bump jackson-dataformat-yaml from 2.12.5 to 2.13.0
  Bump jackson-datatype-jsr310 from 2.12.5 to 2.13.0
  Bump byte-buddy-parent from 1.11.15 to 1.11.18
  Bump classgraph from 4.8.116 to 4.8.121
  Bump checkstyle from 9.0 to 9.0.1
  remove iso charset, website returns utf8 for icar comp sci only returns one result
  fix springer fetcher Fix computer science fetcher
  Squashed 'buildres/csl/csl-locales/' changes from 7a507fc008..495f888637
  Squashed 'buildres/csl/csl-styles/' changes from 5facb37..3b00357
  Update CHANGELOG.md
  snap: Use lzo compression & switch to core20 base
  ...
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.

Show dummy preview for citation styles also when selected in available list in the preferences
3 participants