Changed Styles and Screen Size for Mobile Device #59
No reviewers
Labels
No Label
Large
Medium
Small
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: david/poker-chips-helper#59
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "MantashaNoyela/22"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implemented a light gray mode instead of dark mode, along with a toggle button to switch between light and gray themes. The PokerAppUi.tsx component was created to manage the app’s layout and background themes properly. Updated the index.tsx file to make the app fully functional, responsive, and aligned with a clean, professional UI suitable for mobile devices.
will review soon
Keeping track of the color mode ("color scheme") as a state variable here in
index.tsx
is unfortunately an approach which adds complexity and reduces maintainability. Here are a couple reasonsButton
which now have thedarkMode
prop. However, it seems the app buttons are not actually taking this prop in at the moment, which directly highlights the issue - it is easy to forget to utilize all the props 100% of the time and keep everything consistent. The experience now seems to be gray buttons on a gray background when using the mode_layout.tsx
and would further apply to things like the header barExpo has a native mechanism to help with this issue. I mentioned these docs on PR #18, but I can elaborate a bit.
colorScheme
I feel this should be fixed to use the best approach. I am happy to help if this is a technical challenge, so please let me know if so
@ -94,2 +83,4 @@
} else {
Alert.alert(i18n.t("info"), i18n.t("no_saved_state_found"));
}
};
I see you added atleast 3 new tranlated texts here, but it does not look like there are new additions to en.json and es.json.
I think this will result in an issue where the labels appear incorrect. Please confirm this and fix if necessary by adding the translations. This also applies to the title label
appearance
aboveYou may resolve this
Changing the color theme to be feels a bit like Setting, so the user may choose to do once and is unlikely to often interact with it.
Placing the Section for this feature prominently at the top and having it always be visible and and forcing the user to scroll beyond it for all interactions of the app may not be an ideal user experience.
I am not a UI/UX expert though. However, if you agree with what I am saying, you may choose to move this section into the toggable
Settings
menu just below. In that case you can make the change and resolve this.If the way you have it is intentional please let me know
Can you run
npx tsc
and confirm that this change, and any other new changes are not introducing typescript errors? It appears from my end that they might be. If so, they should be fixed please. However, please see my other comment about prop passing for a color scheme which may make some of these typescript errors redundantFree to resolve.
I may be wrong, but it seems like the purpose of this component is to be a wrapper of sorts for stylistic purposes, to serve the global app layout.
If that is correct, consider that expos stack navigation system provides a purpose built and best practice system to do this universally, and reduce complexity by not needing wrapper components.
For example, our Apps
<Stack>
(as implemented in_layout.tsx
) can take a screen options parameter calledcontentStyle
. This is an object which can contain abackgroundColor
. That would be the expo way to set the background color for our app, even dynamically. The<Stack>
props are powerfull and can take all sorts of nested style options for the main app content, header, title, etc.We can discuss this in sync to make sure we are all on the right path
Do you know what the status bar is doing for the app?
@ -0,0 +10,4 @@
getItem: jest.fn(),
}));
describe("PersistentState.ts", () => {
Not related to this file/line, but I checked out the branch and ran
npm t
It seems that possibly some existing tests have broken with these changes.Can you confirm this, and fix up the pre-existing tests as necessary so they all pass?
Free to resolve when done
It seems like this PR is addressing two different documented issues (#18 and #22), and the one undocumented issue of the non-component code being in component files.
for future reference, I suggest opening different PRs for different issues, and ensureing the issues are created prior to the PR
The StatusBar is used to control the appearance of the mobile device's status bar when the app is running.
@ -0,0 +10,4 @@
getItem: jest.fn(),
}));
describe("PersistentState.ts", () => {
It is working without any error on my machine.
fixed these.
I am having issues while seeing the app on mobile device. So, I could not resolve the issue that the app is not fitting perfectly on smaller devices. @djwesty, would you please resolve the issue? Thank you.
I believe this issue is solved
Sure thing, I will test and commit changes as needed 👍
I've pushed commits with the following changes to ensure the app looks good on a mobile device and is demo ready.
Great work on refining the UI! The switch to dark mode and centralizing the color palette definitely help with consistency.
Thanks for making these improvements!