Nl/add workflows to p99#74
Conversation
There was a problem hiding this comment.
Did you mean to update Visr's config?
There was a problem hiding this comment.
No, I did not. I'm actually embarrassed that I never noticed that.
| import { useQuery } from "@tanstack/react-query"; | ||
| import type { AxiosError } from "axios"; | ||
|
|
||
| export const UserAuthProvider = ({ children }: { children: ReactNode }) => { |
There was a problem hiding this comment.
It should feel wrong copying source code from one app into another. The natural way to share code is to refactor that functionality into a package that both apps can use. If you must do it here, please open issues to clean up said code as we want to tackle this type of divergence early.
There was a problem hiding this comment.
Yeah, I was expecting some flak for that. I was curious to know if you had additional thoughts on this approach. It does make sense if all the apps have a unified approach because they will need authentication. I'll submit an issue for a UserAuth package.
There was a problem hiding this comment.
Modern convention is for tests to live next to the source code rather than in a dedicated folder
There was a problem hiding this comment.
Ok. I like having the tests in a dedicated folder as it's less clutter in the component folders, but I will respect the convention.
There was a problem hiding this comment.
Just so you are aware, since you are following the pattern that visr set: this is not the direction we are following. See instead how i15-1 uses app-shell (improvements are waiting to be merged, see branch dw/appshellimprovements).
There was a problem hiding this comment.
Yes, I did see the changes made to the i15-1 app (Very nice!). The aim right now is to just meet the MVP for CSXID, app-shell can be the next issue. I'm expecting this interface to change a lot which is also why I'm reluctant to add more tests for the newer components at this stage. I've now added app-shell.
There was a problem hiding this comment.
Unless you are testing behaviour again realistic network interactions (more like integration tests), I would recommend vitest stubs/mocks in unit tests over MSW.
70dc96e to
36cf998
Compare
This PR should allow a P99 ptychography workflow to be submitted from the P99 UI.
A new dashboard has been created, with bluesky and workflows moved to separate pages.
I also re-factored the directories which is why the number of files changed is quite high.
PS: I tried using the latest version of sci-react-ui but I kept getting an import error when running the tests.
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object