-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] BUG - Create room - Workspace is not selected by default if one workspace only available in the account #11650
Comments
Triggered auto assignment to @alexpensify ( |
Been working on Picker a lot lately, might as well add a proposal for this. ProposalWhen the Picker has only one item, we should pass it using the
P.S. Screen.Recording.2022-10-07.at.3.16.17.AM.mov |
Triggered auto assignment to @tgolen ( |
@tgolen Whoops! This issue is 2 days overdue. Let's get this updated quick! |
LGTM 👍 🟢 |
Triggered auto assignment to @isabelastisser ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
Current assignee @tgolen is eligible for the External assigner, not assigning anyone new. |
Proposal Solution 1: The case when this should be applied to Create room page only componentDidMount() {
// Workspaces are policies with type === 'free'
const workspaces = _.filter(this.props.policies, policy => policy && policy.type === CONST.POLICY.TYPE.FREE);
- this.setState({workspaceOptions: _.map(workspaces, policy => ({label: policy.name, key: policy.id, value: policy.id}))});
+ this.setState({
+ policyID: workspaces.length === 1 ? workspaces[0].id : '',
+ workspaceOptions: _.map(workspaces, policy => ({label: policy.name, key: policy.id, value: policy.id})),
+ });
} Solution 2: The case when this should be applied to all pickers throughout the app constructor(props) {
super(props);
this.executeOnCloseAndOnBlur = this.executeOnCloseAndOnBlur.bind(this);
+ this.setDefaultValue = this.setDefaultValue.bind(this);
}
+
+ componentDidMount() {
+ this.setDefaultValue();
+ }
+ componentDidUpdate(prevProps) {
+ if (prevProps.items === this.props.items) {
+ return;
+ }
+ this.setDefaultValue();
+ }
+
+ setDefaultValue() {
+ if (this.props.value || !this.props.items || this.props.items.length !== 1 || !this.props.onInputChange) {
+ return;
+ }
+ this.props.onInputChange(this.props.items[0].key);
+ } Demo: Web: demo2.moviOS: demo1.mov |
@rushatgabhane Your proposal will change value in the dropdown or the picker but the changed value is not passed to the parent component. @aimane-chnaif Soluion 2 from above proposal looks good to me. His proposal is to apply the change to a general component cc: @tgolen 🎀👀🎀 C+ reviewed |
Yeah, I like the proposal for applying it to all pickers 👍 🟢 |
@tgolen may I go ahead raising PR? I see 🟢 but still asking because I am not assigned yet. |
I think @isabelastisser needs to create an upwork job and assign it to you next. But, I think you're OK to start on a PR and we'll get they payments and job figured out in the meantime. |
Thanks @tgolen. upwork assign is no problem. that can be later. but I just asked about GH assign. btw will raise PR soon |
📣 @aimane-chnaif You have been assigned to this job by @tgolen! |
Cool, I'll do the GH assignment for you. |
Hey @tgolen , I'm still getting familiar with this process, so do I still need to create an Upwork job and assign it to @aimane-chnaif ? It looks like this has been done here, but I wanted to confirm. Thanks! |
I honestly don't really know. Can you check SO to see what the current process is supposed to be? It's constantly evolving. |
@isabelastisser - I was confused too. On Friday, I asked here and confirmed that I did need to create a job for the GH that I was tagged as |
Hi @aimane-chnaif, can you please let me know if you were already assigned this job in Upwork? If not, I will create one today. Thanks! |
@isabelastisser I am not assigned yet |
Internal job posting: https://www.upwork.com/ab/applicants/1585237928058978304/job-details External job posting: https://www.upwork.com/jobs/~01a510b944f147220c |
@kavimuru , I couldn't find you on Upwork, can you please apply for the job there so that I can hire you? Thanks! |
don't you guys have something to close these issues? its already solved, why is this still open? |
@tgolen PR has not been merged yet. I think you just forgot to click |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist will need to be completed before the issue can be closed:
|
Ack, very sorry about that! I have merged it now. So sorry!
…On Tue, Nov 1, 2022 at 12:49 PM aimane-chnaif ***@***.***> wrote:
@tgolen <https://github.com/tgolen> PR has not been merged yet. I think
you just forgot to click Merge button after Approve
—
Reply to this email directly, view it on GitHub
<#11650 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJMABYHSRMMM3MQW4Y7Y2TWGFQ4XANCNFSM6AAAAAAQ7AXJ2I>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Waiting payment. PR was deployed to production 9 days ago. |
The Contributor and Contributor+ have been paid, the contract has been completed, and the Upwork post has been closed. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
When creating a new room, if you have only one workspace, it should be selected by default
Actual Result:
Select a workspace is shown as default and Showing an error telling the user to select a value from the list when there's only one value
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.2.12-1


Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Recording.633.mp4
Expensify/Expensify Issue URL:
Issue reported by: @iwiznia
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1665065274983609
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: