Skip to content

Conversation

@dhayaraja
Copy link
Collaborator

Build Reminder (for reviewers)

This PR requires a mobile build for both platforms

  • Confirm that the app.json version has been updated and matches versioning format
  • After merging, go to Actions -> Manual EAS Expo Build -> Run workflow dropdown -> Choose appropriate platform(s) -> Run workflow

@vercel
Copy link

vercel bot commented Nov 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ephira Ready Ready Preview Comment Nov 29, 2025 10:51pm

import { View } from "react-native";
import { Dimensions } from "react-native";
import Svg, { Circle, Text, TSpan, Path } from "react-native-svg";
import Svg, { Circle, Text, TSpan, Path, Defs, LinearGradient, Stop } from "react-native-svg";
Copy link
Collaborator

Choose a reason for hiding this comment

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

formatting for linting


// ===== Gradient + Progress Logic =====
const flowDays = flowDataForCurrentMonth.length || 0;
const maxFlowLength = 6;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be in a constants file for others to use - const maxFlowLength = 6;

const visible = C * progress;
const dashOffset = 0; // makes arc grow right -> left

const tailLen = Math.min(C * 0.08, visible);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider making the 0.8 a const value for gradient

const tailOffset = C - visible;

const animatedDashProps = useAnimatedProps(() => ({
strokeDasharray: [visible, C] as unknown as string | number[],
Copy link
Collaborator

Choose a reason for hiding this comment

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

"As known as" bypasses type safety.

<Stop offset="25%" stopColor={FlowColors[1] ?? "#FA8072"} />
<Stop offset="50%" stopColor={FlowColors[2] ?? "#FF0000"} />
<Stop offset="75%" stopColor={FlowColors[3] ?? "#800020"} />
<Stop offset="95%" stopColor="#c6a4dbff" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does the gradient end at 95% instead of 100%?

<Defs>
{/* Main flow gradient */}
<LinearGradient id="flowGradient" x1="100%" y1="0%" x2="0%" y2="100%">
<Stop offset="0%" stopColor={FlowColors[0] ?? "#FFC0CB"} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should use colors defined in other files or add your own const colors rather then hard coding them.

stroke="url(#flowGradient)"
strokeWidth="9"
strokeLinecap="round"
animatedProps={animatedDashProps}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need info for screen readers to process the gradient. See - https://reactnative.dev/docs/accessibility

Copy link
Collaborator

@hauolinalani hauolinalani left a comment

Choose a reason for hiding this comment

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

Looks good to me but would have Jonah look at it for final ok. Just make sure linting is all good :)

@dhayaraja dhayaraja merged commit 7a77af6 into main Nov 29, 2025
5 of 6 checks passed
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.

4 participants