-
Notifications
You must be signed in to change notification settings - Fork 3
Unstable experimental build for TaxEstimateView #984
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?
Conversation
| <Span | ||
| size='md' | ||
| className={item.isDeduction ? 'Layer__tax-estimate__deduction-item' : ''} |
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.
Layer__tax-estimate__deduction-item is just adding padding - we can do that directly on the span without the class name
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.
I think we do need it- because spans only have padding-block but not padding-inline (left-right).
Does it make sense to extend Span to have pb but also pi?
| <Heading size='md' className='Layer__tax-estimate__agi-total-amount'> | ||
| {convertNumberToCurrency(item.amount)} | ||
| </Heading> | ||
| </TooltipTrigger> | ||
| <TooltipContent> | ||
| <Span className='Layer__tax-estimate__tooltip' size='sm'>{item.formula}</Span> |
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.
Layer__tax-estimate__tooltip and Layer__tax-estimate__agi-total-amount are just for colors, I expect we can do that with properties on our text components.
I'm definitely okay with some shortcuts here, but this one feels like it might be even easier to use text props here.
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.
| <Span | ||
| size='md' | ||
| className={item.isDeduction ? 'Layer__tax-estimate__deduction-item' : ''} |
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.
I think we do need it- because spans only have padding-block but not padding-inline (left-right).
Does it make sense to extend Span to have pb but also pi?
| <Heading size='md' className='Layer__tax-estimate__agi-total-amount'> | ||
| {convertNumberToCurrency(item.amount)} | ||
| </Heading> | ||
| </TooltipTrigger> | ||
| <TooltipContent> | ||
| <Span className='Layer__tax-estimate__tooltip' size='sm'>{item.formula}</Span> |
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.
| .Layer__tax-estimate__deduction-item { | ||
| padding-left: var(--spacing-xl); | ||
| } |
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.
Spans currently do not have padding-inline (left, right) and only support padding-block (top, bottom).
Understandably, spans are inline objects, so there is a case to be made that spans shouldn't have padding-inline because that seems weird. I don't want to encourage Span users to use padding-inline if this is a usually unexpected styling approach.
Maybe the better thing to do is wrap a Span with a container, and then have the container manage the padding instead. In terms of DOM structure optimization & also library size, fewer VStack and HStack might be a better preference. Those containers add up, or dare I say... stack. 👀
| @@ -0,0 +1,34 @@ | |||
| .Layer__tax-filing { | |||
| max-width: 1460px; | |||
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.
This magic number is the same magic number used for .Layer__view-header__content.
Greptile OverviewGreptile SummaryThis PR introduces a new experimental
Key Changes:
Style Issues:
Code Quality:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant TaxFilingView
participant Toggle
participant TaxEstimate
participant Sections
participant Store
User->>TaxFilingView: Load View
TaxFilingView->>Store: Initialize with reducer
TaxFilingView->>Toggle: Render tabs
alt User not onboarded
TaxFilingView->>TaxFilingView: setActiveTab('tax-profile')
User->>TaxFilingView: Fill profile form
User->>TaxFilingView: Click Save
TaxFilingView->>Store: Dispatch profile actions
TaxFilingView->>TaxFilingView: setIsOnboarded(true)
TaxFilingView->>TaxFilingView: setActiveTab('tax-estimates')
end
User->>Toggle: Select 'tax-estimates' tab
Toggle->>TaxFilingView: onChange
TaxFilingView->>TaxEstimate: Render with defaults
TaxEstimate->>Sections: Render AGI, Federal, State sections
User->>Sections: Click section to expand
Sections->>TaxFilingView: onExpandedChange(true)
TaxFilingView->>TaxFilingView: Update expansion state
TaxFilingView->>Sections: Re-render with expanded=true
Sections->>User: Show detailed breakdown
User->>TaxEstimate: Click tax amount
TaxEstimate->>TaxFilingView: onFederalTaxesOwedClick
TaxFilingView->>TaxFilingView: setActiveTab, expand section
TaxFilingView->>Sections: Re-render expanded section
|
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.
22 files reviewed, 2 comments
| width: 15rem; | ||
| border-right: 1px solid var(--color-base-300); | ||
| } |
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.
style: Use rem instead of px for the border-right width
| width: 15rem; | |
| border-right: 1px solid var(--color-base-300); | |
| } | |
| .Layer__tax-estimate__overview-total { | |
| width: 15rem; | |
| border-right: 0.0625rem solid var(--color-base-300); | |
| } |
Context Used: Rule from dashboard - When writing CSS styles, prefer rem instead of px usage. (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/views/TaxFiling/taxEstimate.scss
Line: 20:22
Comment:
**style:** Use `rem` instead of `px` for the border-right width
```suggestion
.Layer__tax-estimate__overview-total {
width: 15rem;
border-right: 0.0625rem solid var(--color-base-300);
}
```
**Context Used:** Rule from `dashboard` - When writing CSS styles, prefer `rem` instead of `px` usage. ([source](https://app.greptile.com/review/custom-context?memory=2d1130c2-7a17-4663-ac54-76dc142598ad))
How can I resolve this? If you propose a fix, please make it concise.|
@sarahraines Before reviewing this PR please check out the hooks first #1002 (integration branch) which would merge into this feature branch. |

Description
Groundwork for the
TaxEstimateViewcomponent. Internal unstable build ofTaxEstimateView.Changes
Out of scope
Blockers
How this has been tested?
Visual inspection with the
demo-finguardapp.References