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

fixed issue where large image would render in different env #891

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Aryanamish
Copy link

Updated the backend to send the environment ID with the render information.

Updated the Front End to ignore the incoming window when it is not in the currently selected environment

Motivation and Context

issue #80

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactor or cleanup (changes to existing code for improved readability or performance)

Checklist:

  • I adapted the version number under py/visdom/VERSION according to Semantic Versioning
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@Aryanamish Aryanamish changed the title fixed issue where large image would render in different env #80 fixed issue where large image would render in different env Dec 2, 2022
Copy link
Contributor

@JackUrb JackUrb left a comment

Choose a reason for hiding this comment

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

A nice simple fix to a longstanding problem. Thanks for taking this on @Aryanamish!

@JackUrb
Copy link
Contributor

JackUrb commented Dec 2, 2022

Hm I'm unsure why the tests are failing here, it may be a good idea to rebase then regen the minified frontend.

@da-h
Copy link
Contributor

da-h commented Dec 5, 2022

Great bugfix!

As a side-note:

  • In the "Files changed"-Tab above, Github shows the Linter-Error positions. (I just found out that this feature exists 😅 ).
  • The failing Visual Regression Test leave me a bit puzzled. I would also guess that rebasing should solve these. Otherwise there are possibly some unexpected side-effects? I'll look into this if it's failing again after rebase.

Updated the backend to send envID with the render information.

Updated the Front End to ignore the incoming window when it is not in the current selected environment
@Aryanamish
Copy link
Author

I fixed the linting error

@da-h
Copy link
Contributor

da-h commented Dec 6, 2022

The failing of the functional test seems legitimate to me:
This PR in its current form does not work for forked environments.

Reason is that the state of each window does not yet adapt to the new eid when forking. (See https://github.com/fossasia/visdom/blob/master/py/visdom/server/handlers/web_handlers.py#L472).
I.e. the windows are stored under the forked eid, however the windows (local) state contain the eid the windows belong as well, which has not been adapted, yet.

The Python Linter-Error can be fixed easily.

The visual regression tests: see update below.

Regarding the other failing tests:

  1. What I do not understand, yet, is why the visual regression tests are failing. The error says that the visual test-image dimensions do not match, which i cannot confirm from looking shortly into it. I'll look into it later/tomorrow in more detail. (For update, see below).
  2. The Javascript Linter can be ignored for now. I have a solution at hand, fixing all these errors, but need just a bit more time to finish the PR conscientiously.

Best,
da-h

@da-h
Copy link
Contributor

da-h commented Dec 6, 2022

Update:

I've checked the visual regression test, which is legitimately failing as well:

For instance the end-state for the test compare_plot_line_multiple looks like this:
Compare with compare-view screenshots -- Compare screenshot for plot_line_multiple (failed)

but should contain this compare plot:
compare_plot_line_multiple

Copy link
Contributor

@JackUrb JackUrb left a comment

Choose a reason for hiding this comment

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

Moving to a change request based on @da-h's analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants