-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Frontend prep for migration to nodes #2451
Frontend prep for migration to nodes #2451
Conversation
@blessedcoolant @kasbah I'll be working from this branch/PR on prep for the migration to the new API. My intention is to clean up internal state quite a bit by refactoring its shape, and changing how a lot of the "magic value" parameters are handled (e.g. move the magic into an API payload preprocessor kinda area). Also, to decide how to make HTTP calls - leaning towards RTK's Let me know if you want to participate or have any suggestions or feedback. Also @kasbah check out this PR and branch to see how the new system will work (if you haven't already). |
Sounds like a plan. I'll get in on it and help out once I'm back on the system in a few days. Provided nature doesn't mess things up. Good to have you back. |
I don't have time for a proper review right now but looks like a lot of renaming of things to more appropriate things :) 👍 |
You may want to look at OpenAPI generator and see if any of the languages/frameworks it can generate are useful. |
Redux Toolkit provides a very nice layer over Need to do some testing with regard to runtime generation - getting this working well will be the tricky part, and is needed for automatic UI generation for nodes. |
e4dc2fd
to
79bd16a
Compare
I've set up husky to format w/ prettier and run eslint on each commit. Also, I've formatted and linted the frontend codebase. Frontend contributors will need to |
Added a bunch more code quality stuff:
Added RTK's OpenAPI code generator so can generate the API client. Right now it's pointed at the swagger petstore demo API. It generates on At this point the next step is actually to start migrating to the new API. PS: It's possible I've borked the github actions to lint and format, will worry about it later. |
It seems @lstein moved the directory of the frontend. Maybe rebase this before going ahead with more changes. |
Ack I thought no major refractors were going to happen until after diffusers 😣 |
Yeah I saw - no worries I'll rearrange things in my pr |
7c1b468
to
81e174b
Compare
Let me know when this is in a state for a test run. |
`options` slice was huge and managed a mix of generation parameters and general app settings. It has been split up: - Generation parameters are now in `generationSlice`. - Postprocessing parameters are now in `postprocessingSlice` - UI related things are now in `uiSlice` There is probably more to be done, like `gallerySlice` perhaps should only manage internal gallery state, and not if the gallery is displayed. Full-slice selectors have been made for each slice. Other organisational tweaks.
- `eslint` and `prettier` configs - `husky` to format and lint via pre-commit hook - `babel-plugin-transform-imports` to treeshake `lodash` and other packages if needed Lints and formats codebase.
Use Redux Toolkit Query's OpenAPI code generator to generate TS API. Currently just pointing at the Swagger Petstore endpoint for testing.
81e174b
to
dba2c88
Compare
@blessedcoolant
Both branches just have a couple packages different, and should provide the same UI, but use different generated APIs. There are other options for API generation:
Set upYou will need another clone of InvokeAI to run the nodes server bc it isn't updated yet.
Now you should see a create and invoke button at the top of the app. It will say disconnected but the nodes stuff will still work. Create first then invoke, should make you a pizza and show it in the OS image viewer :) |
d9937e1
to
5e1a72e
Compare
5e1a72e
to
3e02766
Compare
Closing. Will open a new PR for nodes migration when we get to it. |
Frontend prep for migration to nodes
Working on getting things ready.
Organize internal state
seamless
-->shouldTileX
&shouldTileY
, stuff like this)API
createAsyncThunk
, some other library?)Probably a lot of other stuff.