Skip to content
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

Laushinka/error form 10062 #10071

Merged
merged 1 commit into from
May 25, 2022
Merged

Laushinka/error form 10062 #10071

merged 1 commit into from
May 25, 2022

Conversation

laushinka
Copy link
Contributor

@laushinka laushinka commented May 17, 2022

Description

Shows feedback component when there are error messages on:

  • login
  • create workspace
MINIMISED EXPANDED THANKS
Screenshot 2022-05-24 at 13 15 05 Screenshot 2022-05-24 at 13 06 15 Screenshot 2022-05-24 at 13 19 55

Related Issue(s)

Fixes #10062

How to test

(A bit tedious to make sure to get the error message, sorry)

  1. Go to your user in the /admin page and remove the repo feature that gives permission for private repos.
  2. Start a workspace for that private repo, i.e. https://laushinka-f9a883104c.preview.gitpod-dev.com/#[YOUR_PRIVATE_REPO]
  3. See the feedback form below the error message.

Release Notes

Feedback form under error messages on login and starting workspaces.

Documentation

/werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe

@laushinka laushinka force-pushed the laushinka/error-form-10062 branch from a649215 to e6fe246 Compare May 20, 2022 07:45
@roboquat roboquat added size/L and removed size/XL labels May 20, 2022
@laushinka laushinka force-pushed the laushinka/error-form-10062 branch 3 times, most recently from 79bcd31 to ab9830a Compare May 23, 2022 14:58
@laushinka laushinka requested a review from jldec May 23, 2022 15:05
@laushinka laushinka force-pushed the laushinka/error-form-10062 branch 3 times, most recently from 3987aeb to 469cc5c Compare May 23, 2022 18:35
@jldec
Copy link
Contributor

jldec commented May 23, 2022

Thanks @laushinka - that works well - I have a few layout suggestions mainly intended to tone down the new UX by making it smaller and lighter and a bit more separate.

  • minimized - use smaller text (matching grey above) and separate with a border top and margin top - (the feedback widget should be somewhat separate, and not distract from the error)
  • expanded - use grey background around form (maybe rounded corners) instead of horizontal rules
  • thanks - same smaller grey text
MINIMISED EXPANDED THANKS
Screenshot 2022-05-23 at 18 03 48 Screenshot 2022-05-24 at 11 06 46 Screenshot 2022-05-24 at 11 08 03

@laushinka laushinka force-pushed the laushinka/error-form-10062 branch from 469cc5c to 196c5e7 Compare May 23, 2022 21:07
@laushinka
Copy link
Contributor Author

laushinka commented May 24, 2022

Thanks @laushinka - that works well - I have a few layout suggestions

@jldec I thought I was editing the images in the description but I ended up editing your images 🥲

@laushinka laushinka force-pushed the laushinka/error-form-10062 branch from 196c5e7 to 2b4824d Compare May 24, 2022 09:14
@laushinka laushinka marked this pull request as ready for review May 24, 2022 09:15
@laushinka laushinka requested a review from a team May 24, 2022 09:15
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label May 24, 2022
@laushinka
Copy link
Contributor Author

laushinka commented May 24, 2022

@gtsiolis I had to remove the fixed height here from the previous PR [1] because I couldn't make it work with Tailwind classnames for some reason 🤔

@laushinka
Copy link
Contributor Author

@jldec Ready for another review.

@laushinka
Copy link
Contributor Author

laushinka commented May 24, 2022

Rerunning werft for the analytics flag.

/werft run

👍 started the job as gitpod-build-laushinka-error-form-10062.17
(with .werft/ from main)

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Thanks @laushinka for pushing this forward!

Sorry for hijacking the review, but this PR grabbed my attention from UX perspective.

Please, let me know if there's a better way to send feedback like the following and be respectful of everyone's time, avoid reverting our own UX changes, and avoiding back and forth in development. If needed, let's move all the UX feedback below to a separate follow-up issue. ➿ Cc @jldec

{minimisedFirstView && (
<div
className={
"flex flex-col justify-center px-6 border-t border-gray-200 dark:border-gray-800 " +
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Did we discuss anywhere the idea of reusing the existing feedback modal when a user clicks on one of the emojis? This could reuse the same component as is and save us a ton of vertical space, which is quite crucial in the workspace start page.

Copy link
Contributor Author

@laushinka laushinka May 24, 2022

Choose a reason for hiding this comment

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

Do you mean that instead of expanding in page, we would trigger the modal? Good point re the vertical space, but in an error page, the user might want to keep the error and context always in sight, instead of blocked by a modal.
Let me also loop in @jldec

Copy link
Contributor

@gtsiolis gtsiolis May 24, 2022

Choose a reason for hiding this comment

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

Do you mean that instead of expanding in page, we would trigger the modal?

Yes.

Good point re the vertical space, but in an error page, the user might want to keep the error and context always in sight, instead of blocked by a modal.

Fair point, just wanted to bring this up in case this has not been taken into account and could be worth considering.


const height = props.isModal ? "300px" : "";
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Coming to this line triggered from the comment in #10071 (comment). Although non-blocking and a minor issue, is there a technical limitation that led us to remove this?

Copy link
Contributor Author

@laushinka laushinka May 24, 2022

Choose a reason for hiding this comment

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

Made a comment here Ah you already linked it. Yes that was the technical limitation from my end - would love some pointers here!

Copy link
Contributor

@gtsiolis gtsiolis May 24, 2022

Choose a reason for hiding this comment

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

@laushinka Haven't checked this in-depth, but I was thinking we could explicitly and conditionally set padding using utility classes for having a fixed modal height in the case of the modal, as we do now in https://github.com/gitpod-io/gitpod/pull/10071/files#diff-51811862e7996f416f9f7d73ff24341eecd96f3c083fb46d1b00b6cf94b50686R139. Since we're using a specific typography and spacing scale system, there must be a padding values that could help us set a modal height exactly as it the step 2 of the feedback modal.

@laushinka laushinka force-pushed the laushinka/error-form-10062 branch from 882aa12 to 50b79c0 Compare May 24, 2022 13:50
Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

@laushinka UX review round two, done.

I have a feeling that our attempt to reuse some components in combination with the limited discussion of the UX of the scope of this change has led us to go into small circles. If you think any UX feedback here can be addressed separately, let's do that, as the initial state of this PR carried quite a few UX issues and don't want to block this from being merged. Just bringing this up for visibility. Cc @jldec

Comment on lines +126 to +133
<div className="flex justify-end mt-6">
<button className="secondary" onClick={onClose}>
Cancel
</button>
<button className="ml-2" onClick={onSubmit}>
Send Feedback
</button>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Just realized you're trying to reuse the same component in both cases, however, this is breaking the modal structure (see line separator below action buttons) and the padding bug now has moved to the first step of the feedback step.

Feedback Modal (Step 1) Feedback Modal (Step 2)
Screenshot 2022-05-24 at 5 43 22 PM Screenshot 2022-05-24 at 5 43 12 PM

<p className="text-center text-lg mb-8 text-gray-500 dark:text-gray-400">
We'd love to know what you think!
<p className={"text-center text-base " + (props.isError ? "text-gray-400" : "text-gray-500")}>
Thanks for your feedback, we appreciate it.
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Thanks for also including this step in the feedback modal used in the dashboard pages! 🙏

<p className="text-center text-lg mb-8 text-gray-500 dark:text-gray-400">
We'd love to know what you think!
<p className={"text-center text-base " + (props.isError ? "text-gray-400" : "text-gray-500")}>
Thanks for your feedback, we appreciate it.
Copy link
Contributor

@gtsiolis gtsiolis May 24, 2022

Choose a reason for hiding this comment

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

suggestion: Since this PR now also includes the last step of the feedback widget, we could also align the designs to include the 🙏 emoji? You can grab the SVG from the specs included in #10124. Going with a simple inline structure sounds good. WDYT?

Closable last step Non-closable last step
Screenshot 2022-05-24 at 9 33 20 PM Screenshot 2022-05-24 at 9 40 44 PM

In case this sounds interesting to you, we could also reuse the alert component for this which now supports opting in for closable option and an icon, but let's skip this for now.

<p className="text-center text-lg mb-8 text-gray-500 dark:text-gray-400">
We'd love to know what you think!
<p className={"text-center text-base " + (props.isError ? "text-gray-400" : "text-gray-500")}>
Thanks for your feedback, we appreciate it.
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Removing the modal header could confuse users and introduces an inconsistent behavior of the feedback action. Maybe we could skip the header altogether moving away from the modal component as we want to introduce so many customizations here.

Thanks (Modal) Thanks (Error)
Screenshot 2022-05-24 at 5 48 08 PM Screenshot 2022-05-24 at 5 48 13 PM

>
<p className="text-center text-lg mb-8 text-gray-500 dark:text-gray-400">
We'd love to know what you think!
<p className={"text-center text-base " + (props.isError ? "text-gray-400" : "text-gray-500")}>
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: In both cases, being able to dismiss the thanks message at the last step would be great to keep.

<div className="flex flex-col -mx-6 px-6 py-4 border-t border-b border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900">
<div
className={
"flex flex-col px-6 py-4 border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 " +
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Minor color background and padding fix.

Suggested change
"flex flex-col px-6 py-4 border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 " +
"flex flex-col px-4 py-4 border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-800 " +

? "w-96 mt-6 bg-gray-100 dark:bg-gray-800 rounded-xl"
: "-mx-6 border-t border-b")
}
>
<div className="relative">
<div className="absolute flex bottom-5 right-5 -space-x-3">{emojiGroup(24)}</div>
<textarea
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Some class changes to restore some color changes as I cannot add this code suggestion directly on the line.

For https://github.com/gitpod-io/gitpod/pull/10071/files#diff-51811862e7996f416f9f7d73ff24341eecd96f3c083fb46d1b00b6cf94b50686R109:

w-full resize-none text-gray-600 dark:text-gray-300 focus:ring-0 focus:border-gray-400 dark:focus:border-gray-400 rounded-md border dark:bg-gray-800 dark:border-gray-500 border-gray-300

className={
"flex flex-col px-6 py-4 border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 " +
(props.isError
? "w-96 mt-6 bg-gray-100 dark:bg-gray-800 rounded-xl"
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Minor bottom margin to always have some whitespace around the modal.

Suggested change
? "w-96 mt-6 bg-gray-100 dark:bg-gray-800 rounded-xl"
? "w-96 mt-6 bg-gray-50 dark:bg-gray-800 rounded-xl mb-4"

@@ -82,26 +123,27 @@ function FeedbackComponent(props: { onClose: () => void; onSubmit: () => void; i
.
</p>
</div>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

@laushinka
Copy link
Contributor Author

laushinka commented May 25, 2022

@laushinka If you think any UX feedback here can be addressed separately, let's do that

@gtsiolis Thanks, George! Definitely agree that we can carry over the UI feedback in a follow-up issue in case not all are tackled here. Appreciate the detailed look into the design discrepancies 🙏🏽

Comment on lines +26 to +28
if (props.onClose) {
props.onClose();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use optional chaining here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review, @andrew-farries! I tried that but the linter still didn't like it 🙈

@roboquat roboquat merged commit c841bd2 into main May 25, 2022
@roboquat roboquat deleted the laushinka/error-form-10062 branch May 25, 2022 09:08
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/L team: webapp Issue belongs to the WebApp team
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Implement for error pages
5 participants