Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[NO QA]: Workspace Feed - Expensify Card #44549
[NO QA]: Workspace Feed - Expensify Card #44549
Changes from 2 commits
e7cb0ce
2e52deb
9313371
f32bc37
d181a6a
c062841
b0ab3da
c30e9bd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
From the design doc this requires one more param
authToken
which we seem to be missing here.Also i checked the endpoint:
This keeps returning
404
, c.c. @MariaHCD @mountiny , is theBE
part not yet implemented, the api gets on called infinitely on my local setupAlso @narefyev91 , does the option of cards go from the options list? currently when i disable the option i have to either
load
the page again / go back and come again for the option ofExpensify Card
to go away.Screen.Recording.2024-06-29.at.4.43.06.PM.mov
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.
Yeah good point - will add authToken.
Experiencing the same problem with 404 - and that is a reason with toggling off.
We have this line inside useEffect - which should add/remove left menus
When we fire api call (which is not exists) - field is in pending state - that's why nothing happened immediately
If i just use here direct key from onyx
policyFeatureStates
and not statefeatureStates
it will workProbably when API will be working - everything will be works as well
@allgandalf
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.
ummm, thanks for pointing that out, yes that seems logical to me, lets wait on vit and maria for their thoughts though :)
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.
@MariaHCD can you weigh in here to keep it moving? Thanks!
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.
Ah, sorry, I missed this.
The BE API endpoint is not implemented yet. We can focus on the frontend elements / flows for now and then once the BE endpoints are implemented, we can update the FE here and retest the flow.
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.
What does is expected to happen if we call
Policy.enableExpensifyCard
withpolicyID = -1
? I guess the server will throw an error... shouldn't we instead be writing the code like:and disable this button if we don't have a
policy.id
withdisabled: !isEmptyObject(cardsList) || policy?.id,
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.
Good point, @aldo-expensify!
@narefyev91 Can we update to not call Policy.enableExpensifyCard with policyID
-1
?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.
sure
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.
BTW @MariaHCD @aldo-expensify we have the same logic for all menu items
And probably all those API calls will failed?
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.
A little bit confusing if we just re-write only one menu item - and leave everything else as it is. And why such behaviour was not implemented? Probably we do not block action even if policy id is not exists?
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.
Got it. I'm not quite following what the situation is exactly that you need advice on, but if I can be helpful, please let me know and we can keep discussing.
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 this matters more from a code perspective rather than UI, since it may be impossible for this to happen in a normal user case? 🤷
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.
Ok I will make that changes and push a PR to clean up code
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.
Wanted to say that this screen has the policyID in the URL so probably not possible to access.
I do like the clarity though from the code perspective so feel free to clean this up but noting this is lower priority task so try to prioritize other release related work and. Focus on this if you do not have other tasks to handle @narefyev91 thanks!
Thanks @aldo-expensify for raising
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.
@mountiny yeah - i'm happy to help with anything for upcoming releases - but probably for now have some time to pick this one (until something else will come up). Probably waiting when Third-party workspace card feed doc will reviewed and start on that project