-
Notifications
You must be signed in to change notification settings - Fork 23
[jules] enhance: Add skeleton loading to mobile Home screen #298
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -756,3 +756,8 @@ _Document errors and their solutions here as you encounter them._ | |||||||||||||||||||
| - react-native-paper: UI components | ||||||||||||||||||||
| - axios: API calls (via api/client.js) | ||||||||||||||||||||
| - expo: Platform SDK | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Development Workflows | ||||||||||||||||||||
| - The mobile project is configured with `react-native-web`. You can test it in a browser using `npx expo start --web`. | ||||||||||||||||||||
| - Use `AsyncStorage` values (`auth_token`, `refresh_token`, `user_data`) directly into Playwright's `window.localStorage` to bypass login flows for Playwright testing via react-native-web. | ||||||||||||||||||||
| - When creating files in new subdirectories inside `/mobile/`, use `mkdir -p` before the write operation to ensure the path exists. | ||||||||||||||||||||
|
Comment on lines
+760
to
+763
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a blank line below this heading.
Suggested fix ### Development Workflows
+
- The mobile project is configured with `react-native-web`. You can test it in a browser using `npx expo start --web`.
- Use `AsyncStorage` values (`auth_token`, `refresh_token`, `user_data`) directly into Playwright's `window.localStorage` to bypass login flows for Playwright testing via react-native-web.
- When creating files in new subdirectories inside `/mobile/`, use `mkdir -p` before the write operation to ensure the path exists.📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 760-760: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 🤖 Prompt for AI Agents |
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import React from 'react'; | ||
| import { StyleSheet, View } from 'react-native'; | ||
| import { Card } from 'react-native-paper'; | ||
| import Skeleton from '../ui/Skeleton'; | ||
|
|
||
| const GroupListSkeleton = ({ count = 5 }) => { | ||
| return ( | ||
| <View | ||
| style={styles.container} | ||
| accessibilityRole="progressbar" | ||
| accessibilityLabel="Loading groups list" | ||
| > | ||
| {Array.from({ length: count }).map((_, index) => ( | ||
| <Card key={index} style={styles.card}> | ||
| <Card.Title | ||
| title={<Skeleton width={120} height={20} borderRadius={4} />} | ||
|
Comment on lines
+15
to
+16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: In
Because For a “custom component” title:
Citations:
Remove
Use the 🤖 Prompt for AI Agents |
||
| left={(props) => ( | ||
| <Skeleton | ||
| width={props.size || 40} | ||
| height={props.size || 40} | ||
| borderRadius={(props.size || 40) / 2} | ||
| style={{ marginLeft: -8 }} | ||
| /> | ||
| )} | ||
| /> | ||
| <Card.Content> | ||
| <Skeleton width={180} height={16} borderRadius={4} style={{ marginTop: 4 }} /> | ||
| </Card.Content> | ||
| </Card> | ||
| ))} | ||
| </View> | ||
| ); | ||
| }; | ||
|
|
||
| const styles = StyleSheet.create({ | ||
| container: { | ||
| padding: 16, | ||
| }, | ||
| card: { | ||
| marginBottom: 16, | ||
| }, | ||
| }); | ||
|
|
||
| export default GroupListSkeleton; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import React, { useEffect, useRef } from 'react'; | ||
| import { Animated, StyleSheet, View } from 'react-native'; | ||
| import { useTheme } from 'react-native-paper'; | ||
|
|
||
| const Skeleton = ({ width, height, borderRadius = 4, style }) => { | ||
| const theme = useTheme(); | ||
| const opacityAnim = useRef(new Animated.Value(0.3)).current; | ||
|
|
||
| useEffect(() => { | ||
| const loop = Animated.loop( | ||
| Animated.sequence([ | ||
| Animated.timing(opacityAnim, { | ||
| toValue: 1, | ||
| duration: 700, | ||
| useNativeDriver: true, | ||
| }), | ||
| Animated.timing(opacityAnim, { | ||
| toValue: 0.3, | ||
| duration: 700, | ||
| useNativeDriver: true, | ||
| }), | ||
| ]) | ||
| ); | ||
| loop.start(); | ||
| return () => loop.stop(); | ||
| }, [opacityAnim]); | ||
|
|
||
| return ( | ||
| <Animated.View | ||
| style={[ | ||
| styles.skeleton, | ||
| { | ||
| width, | ||
| height, | ||
| borderRadius, | ||
| backgroundColor: theme.colors.surfaceVariant, | ||
| opacity: opacityAnim, | ||
| }, | ||
| style, | ||
| ]} | ||
| /> | ||
| ); | ||
| }; | ||
|
|
||
| const styles = StyleSheet.create({ | ||
| skeleton: { | ||
| overflow: 'hidden', | ||
| }, | ||
| }); | ||
|
|
||
| export default Skeleton; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a standalone dated changelog section.
This March 8 entry is currently nested under
## [2026-01-01] - Initial Setup, which makes the timeline misleading and also triggers the heading-spacing lint. It should be promoted to its own top-level dated section, with a blank line after the heading.Suggested fix
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 127-127: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
🤖 Prompt for AI Agents