Skip to content

Conversation

TimGuiteDiamond
Copy link
Contributor

Attempt to create an approximation of the synoptic layout as used in CS-Studio and EDM, along with some other demonstrations such as a mobile friendly layout and performance page

skyfrench and others added 30 commits November 12, 2019 10:13
Can load pages to itself based on it's name and the address parsing previously implemented. Plenty of work to do but a good start!
Could also happily delete all the Pages *.tsx files as we can now render them inside this
Other hooks such as useLocation are available and would allow us to quickly move forward with what we wanted to do
TimGuiteDiamond and others added 10 commits December 10, 2019 14:30
Turns out this line in App.css is very important, but we should definitely change it at some point ad put it in Widget.tsx or similar to make it clear what is happening and why it works
This was not really a problem before but meant that when the file or JSON did not change, the widget would not re render, which is not ideal when we would like to use the same page but fill it with different values

Does not need to fetch file to perform this transformation, so this should be changed in the future, however this looks smoother for the time being so leaving in for demonstration purposes
Menu Wrapper now has mocked useHistory() hook to allow tests to work as expected

bobConversion checks if an incoming action has a description before trying to extract it

Change in sim.ts to log instead of throw error on unhandled pv name has been reverted
Seems that this issue was actually caused byt eh updated macros continuously causing renders when not necessary and probably triggering unnecessary fetches. Have changed this logic now so that only a change in the file location will trigger a fetch. useEffect may still be necessary in the future if the fetch is expected to possibly take a long time.
This is an ongoing issue with shallow wrapping and the useEffect hook unfortunately! See enzymejs/enzyme#2011
Have decided to do this in conjunction with @willrogers as a stepping stone to a better solution
if (history) {
closePage(action, history);
} else {
log.error("Tried to open a page but no history object passed");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Close not open...

@willrogers
Copy link
Collaborator

Quite a few changes here but most of the important ones are quite likely to be revisited, so I'm happy to merge. Unfortunately Travis seems a bit busy right now.

@TimGuiteDiamond
Copy link
Contributor Author

Yea I'm quite happy to fix some small changes if you have any more suggestions, otherwise we should probably make issues for the bigger issues and move on.

Would be nice to wait for Travis to verify this.

@willrogers willrogers merged commit 1552354 into master Dec 12, 2019
@willrogers willrogers deleted the synoptic branch December 12, 2019 16:48
@aawdls aawdls mentioned this pull request Jun 9, 2023
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