Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Conversation

@bishwenduk029
Copy link

@bishwenduk029 bishwenduk029 commented Apr 21, 2018

Status

  • Ready for Review

  • hyperion (frontend) I am not sure on this, but I did made changes so I think this may be needed
    20c7220fad37de71e798a5c5f6603f92

I created this pull request to be sure that I am coding the fix correctly, so if someone could please review and give any feedback, would be great. Thanks You.

closes #2872

@dev-drprasad
Copy link
Contributor

@bishwenduk029 you have to put x inside [] like [x] while creating pull request so that it will be checkbox. You can add closes #2872 at the end of pull request template so that PR will tagged automatically in relevant issue

@bishwenduk029
Copy link
Author

Oh sorry my bad... @dev-drprasad thanks a ton man.I have updated the same accordingly.

Copy link
Contributor

@dev-drprasad dev-drprasad left a comment

Choose a reason for hiding this comment

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

@bishwenduk029 There is lot of redundant logic in handleIncomingProps method. since we dont need to know active community, we can remove that logic.

onChange={this.setActiveChannel}
value={activeChannel}
>
<option key={-1} value="">
Copy link
Contributor

Choose a reason for hiding this comment

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

As for I know we don't need key prop here. we use key prop only when we do .map. though i might be wrong

Copy link
Author

Choose a reason for hiding this comment

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

@dev-drprasad Oh I think you were reviewing an older version actually, I made some updates to the PR afterwards to remove redundant code. As for the key parameter, I think post render the above option also becomes a part of the rendered array of options(via . map). Since all are now siblings so key should be unique I think.

@brianlovin
Copy link
Contributor

brianlovin commented Apr 22, 2018

One feedback on the design - if we are moving the controls next to the publish button we don't need the 'to' bar in the top. And the order of the actions in the bottom bar should be:

[cancel]                   [community dropdown][channel dropdown][publish]

If that makes sense :)

@dev-drprasad
Copy link
Contributor

@bishwenduk029 good to put first menu item in dropdowns like Select community/Select Channel. what do you say ? @brianlovin

availableChannels: channels,
activeCommunity: community ? community.id : null,
activeChannel: activeChannel ? activeChannel.id : null,
activeCommunity: '',
Copy link
Contributor

Choose a reason for hiding this comment

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

so this means that i have to select a community every time?
If i have already selected a single community at the left side navigation we should also pre-select this community here

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed - it should be pre filtered if the user has selected a community or channel in the left sidebar.

Copy link
Author

Choose a reason for hiding this comment

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

Sure I am on it to make the necessary changes for pre-selected community/channel.

@brianlovin
Copy link
Contributor

@dev-drprasad yup, sounds good 😀

const showSelectedCommunity = activeCommunity
? activeCommunity.length > 0
: false;
const showSelectedChannel = activeChannel
Copy link
Contributor

Choose a reason for hiding this comment

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

showSelectedChannel and showSelectedCommunity are unused atm. Dont know if you plan on using them? :)

Copy link
Author

Choose a reason for hiding this comment

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

No, I need to remove them, thanks @littleStudent .

Bishwendu Kundu and others added 2 commits April 25, 2018 10:53
Copy link
Contributor

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this! I tested it locally, but I don't seem to be able to select a community or channel, the <select> is empty for me?

screen shot 2018-04-26 at 11 03 49

Also, now that we don't have a header anymore we should get rid of that huge amounts of space at the top.

@spectrum-bot
Copy link

spectrum-bot bot commented Apr 29, 2018

Warnings
⚠️

These modified files do not have Flow enabled:

  • src/components/composer/style.js
  • src/components/threadComposer/components/composer.js

Generated by 🚫 dangerJS

@bishwenduk029
Copy link
Author

bishwenduk029 commented Apr 29, 2018

@mxstbr thanks. I checked the use case and it seems I missed an edge case when none of the communities are selected, sorry my bad. So I have made the changes accordingly.

Copy link
Contributor

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

Getting there—it is now defaulting to the first community again, but it should default to no community, and it doesn't unlock the "Publish" button when you have both a community and a channel selected.

@bishwenduk029
Copy link
Author

@mxstbr , I have made the changes accordingly to allow a user to select community in the event there are no pre-selected communities. But for unlocking the Publish button, I need some help understanding. Because I thought title of the thread is also another necessary input for unlocking the Publish button.

1.) Community Selected &
2.) Channel Selected &
3.) Title provided

Unlock the Publish button. Please correct me if I am wrong, I will make the change accordingly.

@mxstbr
Copy link
Contributor

mxstbr commented May 1, 2018

Oh yeah that is correct, my bad! 😅 I'll take another look at this tomorrow if @brianlovin doesn't beat me to it!

mxstbr
mxstbr previously approved these changes May 2, 2018
Copy link
Contributor

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

This works super great now, exactly how I imagined! 😍

@brianlovin want to give this some last polish and then we ship this?

@bishwenduk029
Copy link
Author

Wow gr8!! Thanks @mxstbr and thanks everyone @dev-drprasad @brianlovin and @littleStudent for helping out and also being patient with me. It is really an awesome community to work in. Do you think similar changes would be needed in mobile counterpart of the app.

littleStudent
littleStudent previously approved these changes May 2, 2018
@brianlovin
Copy link
Contributor

brianlovin commented May 3, 2018

Looks like there's a failing test here on composing new threads - @bishwenduk029 would you be able to look into this? TEST_DB=true yarn run dev:api and yarn run cypress:open and then the cypress/integration/thread_spec.js test looks to be the culprit :)

@brianlovin
Copy link
Contributor

It also looks like this is fairly broken on mobile - the thread content has some overflow issues, the composer doesn't take up the full height of the view, and there doesn't seem to be a way to leave the composer on mobile.

@bishwenduk029
Copy link
Author

bishwenduk029 commented Jun 10, 2018

@brianlovin tried fixing the mobile screen discrepancies, can you please review and let me know your feedback on the same. Sorry for the large screenshot below tried reducing the size but could not

image

Regards

@bishwenduk029
Copy link
Author

@mxstbr, @brianlovin , @littleStudent and @dev-drprasad , can you please review PR once and let me know if any further changes are needed

@mxstbr
Copy link
Contributor

mxstbr commented Aug 6, 2018

Sorry for the super slow reply here @bishwenduk029, I'm taking a look now!

@mxstbr
Copy link
Contributor

mxstbr commented Aug 6, 2018

This is actually looking great, not sure why we haven't shipped this yet! Thanks so much @bishwenduk029 🙏

I've got one tiny nit that I'm going to look at before merging this:

  • On the community and channel view, it shows the "Cancel" button even though it shouldn't:

screen shot 2018-08-06 at 14 17 55

@mxstbr
Copy link
Contributor

mxstbr commented Aug 6, 2018

Actually, this also has some pretty big issues on mobile:

screen shot 2018-08-06 at 14 25 36

Not sure how to best resolve this, any ideas @brianlovin?

@brianlovin
Copy link
Contributor

It looks like this branch just needs some work on mobile to flow the content and actions properly. I haven't had much time to put thought into this design though, sorry.

@brianlovin
Copy link
Contributor

We've made a lot of improvements to this with #4575, so going to close this as it's a bit stale. Always room for mobile ux improvements though :)

@brianlovin brianlovin closed this Feb 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the UX of thread composer to prevent accidental community/channel posts

5 participants