-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Help: Fix chat ended experience #1714
Help: Fix chat ended experience #1714
Conversation
ce75090
to
7f250c2
Compare
b85f0ef
to
a18b52f
Compare
f9ddf51
to
9bb9f1c
Compare
I tested this a bit, and it's working well for me. Would rather have another set of eyes on the code, though it looked fine to my somewhat inexperienced eye. |
I did some more testing and it still feels really good on the whole. I think it's a little weird still that in the case of no operators and and ended chat, we re-render the contact form with chat in the lower right and a notice rather than just showing the inline chat with some ui indicating that the chat is done (like what's displayed here), but I think that on the whole, this is a big improvement and we should try to get the code reviewed asap and get this merged. |
99ca2ff
to
39629b4
Compare
@dllh this is fixed now. |
@@ -78,7 +78,7 @@ var OlarkEventEmitter = { | |||
*/ | |||
olarkEventListener: function( event, ...eventArguments ) { | |||
debug( 'Olark event: %s', event ); | |||
this.emit( event, eventArguments ); | |||
this.emit( event, ...eventArguments ); |
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 is a 0.5 out of 10 as far as being an important critique, but is eventArguments
a little verbose when something like args
seems like it would convey the same meaning?
olarkApi( event, ( ...args ) => this.olarkEventListener( event, ...args ) );
…
olarkEventListener( event, ...args ) {
this.emit( event, ...args );
}
setExpanded( isOlarkExpanded ) { | ||
dispatcher.handleServerAction( { | ||
isOlarkExpanded, | ||
type: ActionTypes.OLARK_EXPANDED |
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 is slightly confusing. Maybe OLARK_SET_EXPANDED
would be a clearer indication that the action is doing something.
@omarjackman I left a few suggestions. Happy to go for a second pass when you need it. |
I think the fixes for the last case I mentioned are a big improvement in terms of the interaction. I do have one more bit of feedback for it, but I'd not block the PR for this (would instead see about improving in a future PR). Here's what I see when opers are available and the chat ends: Looks great. If the oper then goes away, I see this: It's definitely better in my opinion that jumping back to the contact form with the chat box at lower right, but it's a little weird that it now shows the different offline form and doesn't have info pre-filled even though I'm logged in. I know that this is something Olark does, so we may be very limited in what we can do to fix it. This feels to me like an improved experience, so I'd be in favor of landing with this and then later exploring our options to improve it further. |
39629b4
to
43c8929
Compare
@dmsnell all comments addressed. More review please. |
looks good on the code size @omarjackman. if there were one thing to mention it's that I probably wouldn't be declaring those new functions as such in the linear flow of the code as it is. I'd probably either create variables that are functions at the top of the scope or create those functions outside of the scope. it's strange to see a bunch of sequential code and then a function definition and then more sequential code I did not test, so please merge at will as long as the testing is taken care of |
… and discontinue showing these notices in the olark widget as visitor notices. Also keep chat inlined if chat ends while on the contact form with no available operators.
43c8929
to
0953de4
Compare
@dmsnell I moved it out of the function. |
showAvailabilityNotice() { | ||
const noticeOptions = { showDismiss: true }; | ||
const { isOperatorAvailable, isUserEligible, isOlarkExpanded, isOlarkReady } = olarkStore.get(); | ||
const onEligibleContactForm = isUserEligible && window.location.pathname === '/help/contact'; |
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 is not a blocker now, but I find it odd to have this tied to a url from this place — seems like the route should choose to display the notice, not the module look at the route.
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.
In other words, this seems like controller's business.
…bility-notice Help: Fix chat ended experience
Fix "chat has ended" experience.
This pull request aims to fix the jarring experience a user might have when a chat has ended and there are no operators available.
Whats changed
!end
command.How to test
Note: You must be in a group that has one operator
!end
command.Before
After
Fixes #1340
Fixes #1341
Fixes #1337