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

Integrate sidebar #80

Merged
merged 18 commits into from
May 31, 2024
Merged

Integrate sidebar #80

merged 18 commits into from
May 31, 2024

Conversation

jb55
Copy link
Contributor

@jb55 jb55 commented May 18, 2024

This follows from:

It hooks up the sidebar into our UI, but we still need to make the buttons work and implement a design:

@jb55 jb55 mentioned this pull request May 18, 2024
@jb55 jb55 marked this pull request as draft May 18, 2024 23:00
@kernelkind
Copy link
Contributor

Run ./preview DesktopGlobalPopup to see an example with accounts populated. I didn't change the StateInMemory (formerly PersistedState) conception yet to not use static IDs because I can't think of a better solution yet. Let me know what you think @jb55

@kernelkind kernelkind marked this pull request as ready for review May 27, 2024 02:47
@jb55
Copy link
Contributor Author

jb55 commented May 27, 2024

let's not merge master into this, I will rebase it

kernelkind and others added 16 commits May 27, 2024 10:48
Signed-off-by: kernelkind <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Create a side panel UI element for desktop with three buttons for:
adding a column, settings, and account management. The account
management button is temporary pending a better design. It is the only
one that is interactable at the moment. When the user clicks it, the
global popup window will be shown and the AccountManagementView will be
presented on the window. The user can click on the X on the top right of
the window to close it.

Signed-off-by: kernelkind <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: kernelkind <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: kernelkind <[email protected]>
Signed-off-by: William Casarin <[email protected]>
we can just get this from the egui::Ui when rendering

Signed-off-by: William Casarin <[email protected]>
buttons don't do anything yet

Signed-off-by: William Casarin <[email protected]>
also use IdTypeMap::insert_temp instead of insert_persisted.
The whole conception of using egui memory to share state is probably
going to be changed to a more robust solution in the future.

Signed-off-by: kernelkind <[email protected]>
Signed-off-by: kernelkind <[email protected]>
@jb55
Copy link
Contributor Author

jb55 commented May 27, 2024

see git range-diff 1b0de88173c9...df0377cb891c for rebase diff

@jb55
Copy link
Contributor Author

jb55 commented May 27, 2024

all this will need to be refactored. There is too much global state everywhere, and many of the components are needlessly touching global state when they can simply return individual responses. I will start on this refactoring to show what I mean. ideally don't do any more work on this branch until we get this sorted.

jb55 added 2 commits May 28, 2024 15:09
We should be treating all ui widgets as pure functions that do not
mutate anything. This will make testing easier, as well as avoiding
shared mutable references.

Signed-off-by: William Casarin <[email protected]>
@jb55 jb55 merged commit 83eab71 into master May 31, 2024
6 of 8 checks passed
@jb55
Copy link
Contributor Author

jb55 commented May 31, 2024

I'm happy the state this is in for now, even if the sidebar is non-functional. We have click handling states at least! Wanted to merge this since there are a bunch of changes and I don't want this to get too out of sync with master.

Working on nav so that we can re-add the global popup.

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.

2 participants