generated from allen-cell-animated/github-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix/viewer errors #343
Merged
Merged
Fix/viewer errors #343
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original
from "../es"
was there intentionally to help simulate an environment more like simularium-website where we are loading from the packaged build. This was relevant because of differences in the way the web worker and style sheets are loaded, for example. So if changing this, we should be intentional about itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, it seemed like this was what was causing a lot of the typing errors and it means you don't have to rebuild to make sure all your changes are reflected in the app. I don't see any differences after changes these to the way the app behaves. do you know of something I could test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to change the server to production because the staging one is down, but I was able to load COVIDLUNG and it seemed to behave the same in both cases (changing the imports)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expected to behave the same if you :
from ../es
and runnpm build
beforenpm start
from ../src
and don't build before start.Main thing to test is loading a trajectory with pdbs.
But the ../es case is more important to make sure things are working for production.
Being intentional probably means just keeping it easy to switch between the two (keep all the imports in this one statement if possible) and maybe put something in the readme, and a comment at the import to say what to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no I know, I meant is there any behavior you know about that does behave differently in the two states? Because either way we're running the same commands, ie,
npm start
callsnpm build
and the dev server setup is supposed to serve the built artifacts just while watching for changes. I'm in favor of using the/src
because it removes the typescript errors so it's more obvious when we do have an actual error in the test bed viewer. But I can add a commented out import statement? Is that what you're suggesting?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be no actual differences in runtime behavior between the two cases of importing from src vs es. In the past, however, there HAVE been differences which had to be fixed. Loading it here lets you find the error before you test in simularium-website. This is the reason why this demo app is loading from
es/
.There definitely shouldn't be any typescript errors when we import from the es/ dir, so if there are, maybe that means we need to make sure that the test app can see the
type-declarations
directory.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I would like to keep the ability to run the test app with the post-build artifacts.
In order to support both situations (import from es and requiring a npm build, versus importing from src and not requiring a npm build) I would suggest a separate
start
script in package.json and some kind of dev-or-production switch in the code. The alternative is to have a commented-out version of both like this:As long as there is only one place to do this, then you have to just change the comment to make it use the right thing. And then every PR from now on will have this comment/uncomment battle... 🤣