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

PR: Setup boilerplate for the home screen #14 #35

Merged
merged 5 commits into from
Oct 18, 2023

Conversation

tchojnacki
Copy link
Member

@tchojnacki tchojnacki commented Oct 17, 2023

Obviously the specific buttons located on the dashboard and the menu are just placeholders, but we have the page "skeleton" set up.

Dashboard:
Screenshot_20231018_111408_Expo Go

Menu (senior):
Screenshot_20231018_111419_Expo Go

Menu (caretaker):
Screenshot_20231018_111400_Expo Go

@tchojnacki tchojnacki linked an issue Oct 17, 2023 that may be closed by this pull request
import { View } from "@/components/Themed";

const mockDashboardGadgets: ActionKey[] = [
Copy link
Member Author

Choose a reason for hiding this comment

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

Placeholder - this will be downloaded from the backend.

@@ -34,7 +37,7 @@ export const Landing = ({ debug = false }: { debug?: boolean }) => {
{debug ? (
<>
<MonoText style={styles.debug}>
{new URL("/healthz", BASE_URL).toString()}
Copy link
Member Author

Choose a reason for hiding this comment

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

This was broken after the API change 😨

@@ -0,0 +1,16 @@
import type { Action } from "./types";

export const actions = {
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: #36

@@ -20,3 +20,13 @@ export const MockRouter = ({
location={new URL(initialRoute, "test://")}
/>
);

export const clearHistory = (
Copy link
Member Author

Choose a reason for hiding this comment

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

);
const logOut = useCallback(() => setData({ known: "nothing" }), [setData]);
const logOut = useCallback(() => {
clearHistory(router, "/auth/login");
Copy link
Member Author

Choose a reason for hiding this comment

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

There were many weird edge cases, e.g.:

  1. Log in
  2. Select profile
  3. Go from dashboard to menu
  4. Log out
  5. You now have the "back" button (going to the dashboard) visible - it doesn't do anything because of safety mechanisms from my last PR, but it is there nevertheless

We reset the router on every identity change to ensure that doesn't happen.

@tchojnacki tchojnacki changed the title DRAFT: Setup boilerplate for the home screen #14 PR: Setup boilerplate for the home screen #14 Oct 18, 2023
Copy link
Contributor

@kubaczerwinski77 kubaczerwinski77 left a comment

Choose a reason for hiding this comment

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

LGTM

@tchojnacki tchojnacki merged commit 41b5f75 into main Oct 18, 2023
1 check passed
@tchojnacki tchojnacki deleted the 14-setup-boilerplate-for-the-home-screen branch October 18, 2023 13:14
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.

Setup boilerplate for the home screen
2 participants