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

Import golden-layout as a package #20

Closed
mofojed opened this issue Mar 23, 2021 · 7 comments · Fixed by #129
Closed

Import golden-layout as a package #20

mofojed opened this issue Mar 23, 2021 · 7 comments · Fixed by #129
Assignees
Milestone

Comments

@mofojed
Copy link
Member

mofojed commented Mar 23, 2021

We currently have a fork of golden-layout: https://github.com/illumon-public/golden-layout/

However, the newest version of GoldenLayout dropped React support: https://github.com/golden-layout/golden-layout

They recommend switching the FlexLayout, but there's issues in FlexLayout that @dsmmcken has already fixed (such as handling long tab names, overflow when you have more tabs in the stack that can be shown that doesn't suck, being able to drag a tab and have the edge of the stack scroll, a tab placeholder that represents the actual content size, etc).

Since our previous fork will never be able to merge back to their fork, we may as well import it into our repo. We should also publish an actual package with an updated version, rather than referencing it by SHA/old repo.

Eventually we should either switch to FlexLayout (and fix the above issues that we've already fixed), or rewrite our golden-layout without jquery.

@mofojed
Copy link
Member Author

mofojed commented Apr 19, 2021

We're going to need this in a separate repo - may as well just fork the existing repo and push it under our org. I don't think there's any advantage to having it as a folder within our web/client-ui repo.

@dsmmcken
Copy link
Contributor

My opinion is that it would be more friction to have this separate, and we should do the work to bring it under one build process.

@mofojed
Copy link
Member Author

mofojed commented Apr 29, 2021

Golden-Layout is MIT license, we're going Apache for web-client-ui and Deephaven license for core to start, one license per repo, we'll need this in a separate repo.

@dsmmcken
Copy link
Contributor

dsmmcken commented Apr 29, 2021 via email

@mofojed
Copy link
Member Author

mofojed commented Apr 30, 2021

I think it will be for all repos under the Deephaven org?
Which friction are you worried about having it separate? Setting up npm link for development?

@mofojed
Copy link
Member Author

mofojed commented Apr 30, 2021

Going fork will require deephaven/deephaven-core#491

@dsmmcken
Copy link
Contributor

I think it really only matters for core to have a clean license, the rest aren't the focus of attention. If client-ui has a mixed licensed file, who cares. Unlike core, the packages are still distributed individually, where licensing is clear.

We most definitely currently experience the friction of it being a separate repo, and have been less likely to contribute to it, and less likely to but the same review on it.

@mofojed mofojed transferred this issue from deephaven/deephaven-core May 10, 2021
@pete-petey pete-petey added this to the June 2021 milestone Jun 2, 2021
@mofojed mofojed modified the milestones: June 2021, July 2021 Jul 6, 2021
@mofojed mofojed modified the milestones: July 2021, August 2021 Aug 9, 2021
mofojed pushed a commit that referenced this issue Aug 25, 2023
fixes #1439 - Heap usage code now guarantees that new requests won't be
scheduled until all previous requests are complete.

## Testing
I tested by shutting my Mac for ~2 hours and returning. Timings looks
something like this:

### Summary
<img width="310" alt="image"
src="https://github.com/deephaven/web-client-ui/assets/1900643/0ad2d426-2fed-48e8-a255-989ee5d524f3">

It seems that requests still happen occasionally while sleeping. On Wake
up, there were a few ticks resulting in "Unable to get heap usage"
console errors. Then a prompt showed up indicating credentials had
expired at which point requests start succeeding again.

### Full Console Log
```
useAsyncInterval.ts:37 [useAsyncInterval] tick #1. 10068 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9918
useAsyncInterval.ts:37 [useAsyncInterval] tick #2. 9936 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #3. 10026 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9958
useAsyncInterval.ts:62 [useAsyncInterval] Setting interval minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #1. 941977 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #2. 13 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #3. 2038465 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #4. 19 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #5. 537820 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #6. 16 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #7. 191633 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #8. 18 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #9. 23720 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #10. 18 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #11. 886367 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #12. 17 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #13. 1010951 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #14. 6 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #15. 650011 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #16. 13 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #17. 731687 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #18. 19 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #19. 120545 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #20. 16 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #21. 446345 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 0
useAsyncInterval.ts:37 [useAsyncInterval] tick #22. 13 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #23. 10999 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 8987
useAsyncInterval.ts:37 [useAsyncInterval] tick #24. 9020 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #25. 10030 ms elapsed since last tick.
HeapUsage.tsx:68 [HeapUsage] Unable to get heap usage Error: Authentication details invalid
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9955
useAsyncInterval.ts:37 [useAsyncInterval] tick #26. 9979 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #27. 10027 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9956
useAsyncInterval.ts:62 [useAsyncInterval] Setting interval minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #1. 10695 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9290
useAsyncInterval.ts:37 [useAsyncInterval] tick #2. 9311 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 10000
useAsyncInterval.ts:37 [useAsyncInterval] tick #3. 10017 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9969
useAsyncInterval.ts:37 [useAsyncInterval] tick #4. 9992 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9992
useAsyncInterval.ts:37 [useAsyncInterval] tick #5. 10680 ms elapsed since last tick.
useAsyncInterval.ts:56 [useAsyncInterval] adjusted minIntervalMs: 9308
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants