Closed marcochavezf closed 1 year ago
Triggered auto assignment to @flaviadefaria (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.
Triggered auto assignment to Design team member for new feature review - @shawnborton (NewFeature
)
Job added to Upwork: https://www.upwork.com/jobs/~0167d6cf391edcfcf4
Current assignee @flaviadefaria is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External
)
Given the complexity of this implementation, I believe a base payment of $2000 would be appropriate.
Upwork job price has been updated to $2000
New Feature request
Firstly we need to add a new option on FAB as Save the world
and add a new route
On the Save the world
we page we should re-use the <MenuItem>
component in order to display two new options to use as below mentioned
For rendering the SVG on header we can simply use SVG
as a component we can take reference from a new page called LoungeAccessPage.js
We need to create 2 separate pages (route) and inside the <MenuItem>
I know a teacher ()
I am a teacher
I know a teacher
will consist of First name of teacher
, Last name
, phone number
, or their email address
Here we need to re-use the <Form>
component and follow pattern A (Optimistic Without Feedback Pattern)
As here we don't need successData
or failureData
, we should only put optimisticData
in the options
We need to apply Form
validation, we can simply add the below condition on validate
props which basically validate all the conditions before calling the API
_.isEmpty(values.phoneOrEmail)
!_.isEmpty(values.phoneOrEmail) && !((parsePhoneNumber(phoneLogin).possible && Str.isValidPhone(phoneLogin.slice(0))) || Str.isValidEmail(values.phoneOrEmail))
After the referrer clicks on the submit button, we redirect them to the public room. We’ll save the reportID
as a constant in the application to redirect the user to the public room (reportID value TBD but meanwhile we can use the reportID for the ECX #anounce room 3504895439653267) and probably pass to API and store.
Additionally, if the referrer clicks on the submit button, we’ll send that data along with the accountID
of the referrer (inviterID) to the new API command called ReferTeachersUniteVolunteer.
If the user performs this action in offline mode, we’ll just display the chat report as loading.
I am a teacher
opens up a new page (form) on all applications
On this flow firstly we need to create a new util-helper
method basically that will check and compare the current primary login that is not public in user publicDomains
based on the above given list we should navigate between the below 2 case
Case 1 (if logged user’s primary mail is non-public email)
<FixedFooter>
inside that <button>
component and onPressing
that user will be redirected to ContactMethod
pageCase 2 (if logged user’s primary mail is public email)
For this page Intro to your school principal
here we will re-use the <Form>
component (and we need to follow pattern B Optimistic WITH Feedback Pattern)
Here we need to add 3 <Form>
fields as Principal first name
, last name
and work email
We need to use validation
props of <Form>
to validate all three filed upon success passing all the validation user can click Form
to proceed next
We’ll be creating a new policyExpenseChat by pressing Submit
button
When the user clicks on the “Let’s start” button, we will:
Implement part of the Teacher's Unite sign up process.
New Feature Request.
Firstly add a new menu item in the FAB called "Save the world" to trigger the Teachers Unite feature.
This view will have options to choose from Volunteer referral flow ("I know a teacher") or the Volunteer sign-up flow ("I am a teacher").
xx
Implement Teacher Unite SIgn Up Process.
New Feature to implement
First need to add new FAB in menu called "Save The World"
Create 3 new routers for navigation purpose Save The World,I know a teacher,I am a teacher
Create "Save The World" Page as per the design.
Create 3 form field first name,last name,email or phone number
Add form validation as per description
As per UX pattern follow PatternA and implement according to it when user submit the form.
navigate to chat-report if user is online and if user is offline display loading state in chat report.
Implement "Update Your Email Address" Page
Check if user has non public email or not based on provided public ,if yes then navigate to "Intro to your school principal" page ,else navigate to "Update Your Email Address"
Implement "Intro to your school principal" as per design .
Create 3 form field principal first name,principal last name,principal work email
Add form validation as per description
As per UX pattern follow PatternB(optimistic with feedback) and implement according to it when user submit the form.
when user submit the form naviagate to optimistic policyExpenseChat and send optimistic reportId ,reportActionId and other form data to AddSchoolPrincipal API.
Hi, So here is my understanding based on what you have explained.
The primary aim is to: Create a chat room where other flows are completed and we just need to add signup flow.
So the flow's understanding goes as mentioned below. -Whenever a user clicks on 'save the world' button, it will open the teacher unite modal and will display 2 action buttons; namely 'I know a teacher' and 'I am a teacher'.
And in second case, if the user clicks on the 'I am a teacher' button, the system should or will first check whether the email is public. For that, we loop through defined domain and check if it is public or not. If it is, then the user will need to update their email and if it is public then it will open a form with principle first name, last name and email and we put validation on this form as well, post which we will click on 'let's start' which will create policy expense chat and redirect user to that chat and call addSchoolPrinciple API to add data.
This whole process would consume around 4 working days and will cost you $550.00/- flat for a flawless output from my end. I hope the timeline and the quote sounds workable to you. Also, if you feel I have missed out or misunderstood something, please let me know and I will be happy to correct.
With that I would await a positive response from your end in the matter.
Thanks & Regards, James
Contributor details Your Expensify account email: James.k@prismitsystems.com Upwork Profile Link: https://www.upwork.com/freelancers/jameskshitij
📣 @James-Xitij! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Will be reviewing this in sometime.
Hi guys, thanks for the proposals, and sorry for not being clear in the description, but can you outline roughly what new components you will create for the general plan described in the OP? Also, if you're going to reuse existing components and describre roughly what will each component do? I will update the OP to reflect that
updated the proposal to add existing component re-use @marcochavezf @parasharrajat
@parasharrajat thoughts on the proposals above?
Hi guys, thanks for the proposals, and sorry for not being clear in the description, but can you outline roughly what new components you will create for the general plan described in the OP? Also, if you're going to reuse existing components and describre roughly what will each component do? I will update the OP to reflect that
So if your modal component is already created and it is created in a way that it accepts the passed parameters to display then I will use the same component otherwise I will create a new component to display data into that model. then for managing form and selection, I will use a step so that when the user completes the first step then display second part conditionally the same as the third step. And if you manage function calls in the hooks file then I will create a hooks file for that modal and call related functions by steps from there otherwise call functions from the same component.
Thanks @dhairyasenjaliya, the updated proposal covers most of what we would need to implement the sign-up flows. Let's begin with it since we'd want to get it live soon. We can address any specific detail or minor changes (if required) in the PR.
Give me 15 mins to review it @marcochavezf
Hi guys, thanks for the proposals, and sorry for not being clear in the description, but can you outline roughly what new components you will create for the general plan described in the OP? Also, if you're going to reuse existing components and describre roughly what will each component do? I will update the OP to reflect that
So if your modal component is already created and it is created in a way that it accepts the passed parameters to display then I will use the same component otherwise I will create a new component to display data into that model. then for managing form and selection, I will use a step so that when the user completes the first step then display second part conditionally the same as the third step. And if you manage function calls in the hooks file then I will create a hooks file for that modal and call related functions by steps from there otherwise call functions from the same component.
@James-Xitij, thanks for the update here, but we usually look for proposals that demonstrate that you have knowledge about the code base by mentioning the specific parts that you'd change in the implementation. That will give us the confidence that you have a detailed plan to tackle the problem or implement the solution without much surprises.
I looked at all the proposals and @dhairyasenjaliya's proposal seems most complete. It will be good to have someone who knows the App in detail again @dhairyasenjaliya have more experience than others so I m good with their proposal.
:ribbon: :eyes: :ribbon: C+ reviewed
Current assignee @marcochavezf is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Thanks @parasharrajat, assigning @dhairyasenjaliya 🚀
📣 @parasharrajat Please request via NewDot manual requests for the Reviewer role ($2000)
📣 @dhairyasenjaliya 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
All right thank you for the assignment I will start PR soon :)
hey @marcochavezf @parasharrajat I have started PR currently I am adding the Routes and basic design following the current coding styling but I will be needing following
Text
in both the language eng
& Spanish
(currently I'm doing google translate if that's fine)<Form>
here need to know if we want by default keyboard to be autoFocus or not change
Thanks for letting me know. I would try and expand. But I see that a selection has already been made on this task. But if I still need to submit a well explained approach, I will be happy to do so. Just let me know and I shall do the needful.
Mokup design to follow exact details needed (probably will tag @shawnborton )
it present on the OP.
Translation of all the Text in both the language eng & Spanish (currently I'm doing google translate if that's fine)
yes, it's fine for now. You will have to ask this on Slack and confirm all of them. Its better to do it now.
All the SVG and icons needed for the design
cc: @shawnborton
As we have a couple of
Follow other forms. (like displayName etc).
Hi @dhairyasenjaliya, I think these are the svgs that you would need for the implementation, but if you need another icon/image let me know
I'm happy to regenerate these assets for you, just tag me in your PR. As they stand now, they aren't using the correct bounding box size, etc.
For the scale, we actually have that as an animation, so perhaps you can mirror what @roryabraham is doing for the Preferences page.
Indeed I was following that exact PR for showing IllustratedHeader
I have started to add those SVG's as well
Hi @dhairyasenjaliya, just for visibility, could you provide a short update on what you're working on and what remains to be done?
Question - 1
After the referrer clicks on the submit button, we redirect them to the public room. We’ll save the reportID as a constant in the application to redirect the user to the public room (reportID value TBD but meanwhile we can use the reportID for the ECX #anounce room 3504895439653267)
Question - 2
ReferTeachersUniteVolunteer
Is this API
ready yet? and also we have 2 parameters as accountID
and inviterID
I believe these are the required parameters but do we have any other parameters to pass like optional Question - 3
we'll check if the domain of the user’s primary login is not public (we’ll re-use this [logic] on the client-side)
Question - 4
We will hardcode the policyID for the TU campaign.
policyID
for the TU campaign decided yet and if yes what will be the ID
?Question - 5
AddSchoolPrincipal
Is this API
ready yet? and also we have 2 parameters as reportID
and reportActionID
I believe these are the required parameters but do we have any other parameters to pass like optional (Principal firstName, lastName, email)CC @marcochavezf @parasharrajat
Do we have a similar function available on the app? so that I can refer for redirect them to the public room.
You will just have to use Navigation.navigate. Save the ID in a CONST.
Question - 2
Create an action with API call to this API. You can pass any parameters you want to for now. We can update this later. It might be done in separate PR. It will be https://github.com/Expensify/App/blob/main/contributingGuides/OFFLINE_UX.md#a---optimistic-without-feedback-pattern without optimistic data I guess.
Seems I can't access the given link can I get a reference for that function to start adding
There should be a function already for this. I think you can use ONYXKEYS.USER
isFromPublicDomain
value.
We will hardcode the policyID for the TU campaign.
For testing, you can use any of your workspaces. Create a CONST for this.
Question - 5
You have to send all the collected data plus the optimistic created reportID and reportActionID.
Thanks for the update @dhairyasenjaliya! We're still working on the API commands, so we can update that later. Just to complement a little bit more @parasharrajat's responses (thanks btw!):
For the ReferTeachersUniteVolunteer
command we'll just need to send the teacher's data: email
, firstName
and lastName
.
For the AddSchoolPrincipal
command, we'll also send the email
, firstName
and lastName
of the principal and the policyExpenseChatReportID
and policyExpenseCreatedReportActionID
of the workspace chat (policyExpenseChat). The policyID
is not ready yet, but I will get back to you once we have it, meanwhile you can create a workspace and use its policyID
.
WRT the logic to check the public domain, it links to a private repository but is just comparing the email with the array of publicDomains
posted in the OP.
Hi @dhairyasenjaliya, can you provide an update?
hey @marcochavezf Im just adding changes as per the above comments, mostly will add these changes by today
@dhairyasenjaliya Can you share the link to draft PR?
@parasharrajat here https://github.com/Expensify/App/pull/23063
hey @marcochavezf I have added changes as per the above comments and also addressed the changes reviewed by @parasharrajat also you can re-review the PR I have added another changes after that
@dhairyasenjaliya If you think your PR is ready, mark it ready for review.
@parasharrajat I think we can start review without API for now
@dhairyasenjaliya Can you increase the frequency of updates on this PR? It's progressing very slowly.
sure will increase
Hey guys what is the latest here? I'd like to report back to the internal team.
PR waiting inputs on @marcochavezf
I will check the other pending comments today
@dhairyasenjaliya could you post an update of what has been done so far and what's missing, please?
Strategic Context
People around the world incur out-of-pocket expenses to fight injustice that they care about in their local community. Expensify.org calls them “volunteers”. A great example of this are school teachers who pay for books, prizes, classroom decor, etc. out of their own money to plug gaps left by state underfunding. Expensify’s native community provides a unique and powerful opportunity to fight social injustice around the world by directly connecting our charity (Expensify.org) and Expensify members (the public) with these volunteers to split their expense costs. It is through these ‘campaigns’ that Expensify.org slowly evolves the traditional donation model into efficient, emotionally engaging and fraud-free giving.
Solution
We're launching a new initiative called "Teachers Unite" for educators who personally finance essential classroom supplies, inviting them to share these costs with Expensify.org through NewDot. Thus, the goal for this GH is to implement part of the sign-up procedures for this campaign.
Details
A new menu item in the FAB will be called "Save the world". When the user selects this option, we’ll show the new “Teachers Unite” view with a “select option” to choose either the Volunteer referral flow (“I know a teacher”) or the Volunteer sign-up flow (“I am a teacher”).
Volunteer referral flow:
This flow will consist of only one form view (“I know a teacher”). According to the Offline UX diagram, this will be pattern A (optimistic without feedback), because the server response can be anticipated and the referrer doesn’t need to know if the action is successful.
Selecting ‘I know a teacher’ opens up a new page requesting:
After the referrer clicks on the submit button, we redirect them to the public room. We’ll save the reportID as a constant in the application to redirect the user to the public room (reportID value TBD but meanwhile we can use the reportID for the ECX #anounce room
3504895439653267
).Additionally, the referrer clicks on the submit button, we’ll send that data along with the accountID of the referrer (inviterID) to the new API command called
ReferTeachersUniteVolunteer
.For form error messages, will surface the following:
Volunteer Sign-Up flow
Selecting ‘I am a teacher’ opens up a new page (form) on all applications:
To allow the teacher to sign-in up, we'd need to verify their school email is validated. So when the user selects “I’m a teacher”, we'll check if the domain of the user’s primary login is not public (we’ll re-use this logic on the client-side). If this is the case, we will display the page “Update your email address”. The “Contact methods” link and the “Update email address” button will redirect the user to the "Contact methods" page.
If the teacher already has their school email as their primary email, we’ll show the form view “Intro to your school principal”. Since we’ll be creating a new policyExpenseChat (workspace chat) for the teacher after the user completes the form, we’ll use pattern B (optimistic with feedback). It will be helpful for the user to know if the workspace chat was created if they took this action while offline.
AddSchoolPrincipal
(TBD) API command.We can check if an email has a public domain by checking if the email is contained in some of the following values:
For this new feature, a detailed proposed solution isn't necessary. We simply require a rough outline of your implementation strategy by describing what new components you will build, if you will re-use some existing components, and roughly what those components will do.
Upwork Automation - Do Not Edit