Skip to content

Added skeleton fetching screen on Picking screen - #447

Merged
awalkowiak merged 1 commit into
developfrom
OBLS-907-2
Sep 8, 2026
Merged

awalkowiak merged 1 commit into
developfrom
OBLS-907-2

Conversation

@druchniewicz

@druchniewicz druchniewicz commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator
PickingSkeletonFetching.webm

@awalkowiak awalkowiak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it lgtm, but I'll wait for the backend to be merged first

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The counts-loading flag should be reset when re-fetching so the skeleton accurately reflects subsequent refreshes, and list keys should use stable identifiers (item.code) to avoid remount issues.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds a shimmer/skeleton UI to the Picking “Pick Type” screen so the options + form don’t render until pick-task counts have finished loading, improving perceived responsiveness during the initial fetch.

Changes:

  • Added a PickingPickTypeSkeleton component that mirrors the pick-type option list and form layout with shimmer placeholders.
  • Added skeleton-specific styles for radio/title/subtitle/count/input/button placeholders.
  • Updated PickingPickTypeScreen to render the skeleton until counts fetch completes.
File summaries
File Description
src/screens/Picking/styles.ts Adds style tokens for shimmer blocks (radio/title/subtitle/count/input/button).
src/screens/Picking/PickingPickTypeSkeleton.tsx Introduces a skeleton component for the pick-type options + form layout.
src/screens/Picking/PickingPickTypeScreen.tsx Tracks counts-load completion and conditionally renders skeleton vs. real UI.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 27 to 33
const fetchCounts = React.useCallback(() => {
dispatch(
getPickTaskCountsAction(({ response, errorMessage }) => {
setHasLoadedCounts(true);
if (errorMessage || !response?.data) {
Alert.alert('Error', 'Failed to load pick task counts. Please try again.');
return;
Comment on lines +118 to +123
<TouchableOpacity
key={item.label}
activeOpacity={0.7}
style={[styles.optionRow, isLast && styles.optionRowLast, selected && styles.optionRowSelected]}
onPress={() => setDeliveryType(item)}
>
Comment on lines +18 to +20
<View key={item.label} style={[styles.optionRow, isLast && styles.optionRowLast]}>
<ShimmerBlock style={styles.radioSkeleton} />

@awalkowiak
awalkowiak merged commit 172afed into develop Sep 8, 2026
2 checks passed
@awalkowiak
awalkowiak deleted the OBLS-907-2 branch September 8, 2026 09:44
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.

3 participants