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

Deprecated Stack badges on Stack page (Requires deprecated stack at all times) #573

Merged
merged 7 commits into from
Apr 24, 2020

Conversation

KyeMaloy97
Copy link
Contributor

Checklist

  • commit message follows commit guidelines.
  • website builds and runs in production - for information on how to test locally go here.

Description

Smaller PR than #548 as this can be merged without the Firefox issue. Will require one stack to be on the site at all times though (in the YAML files).

Functionally adds a badge to deprecated stacks, hovering on desktop shows the message and clicking on mobile opens an alert.

Related Issues

#issue-number

@KyeMaloy97 KyeMaloy97 changed the title Issue.deprecationremake Deprecated Stack badges on Stack page (Requires deprecated stack at all times) Apr 23, 2020
Copy link
Collaborator

@Kamran64 Kamran64 left a comment

Choose a reason for hiding this comment

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

Pulled down changes to test and LGTM - Will let someone else review and approve code changes.

Copy link
Collaborator

@Bazif-Khan Bazif-Khan left a comment

Choose a reason for hiding this comment

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

Currently, the way you are displaying the message (js alert) on mobile is not working on Firefox and Safari.

It looks good to me, just added some comments for small minor tweaks to make different devices warning message design similar and change the cursor on hover on warning icon in desktop view. It'll be a great addition.

src/styles/main.css Show resolved Hide resolved

showDeprecationMessageMobile(e) {
if (this.isMobileBrowser()) {
alert(e);
Copy link
Collaborator

@Bazif-Khan Bazif-Khan Apr 24, 2020

Choose a reason for hiding this comment

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

I'd recommend not to use alert for the message.

To make the message similar to the desktop view, you can fake the title tooltip behaviour with Javascript. When you click on the icon, the title class can be added and when you'll click anywhere else, then that class should be removed.

You can have a look at this to get the idea: https://stackoverflow.com/questions/12539006/tooltips-for-mobile-browsers

You should implement this for mobile and Ipad screen size as Ipad doesn't have on hover as well.

I think currently you are doing this just for mobile view.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have tested on the iOS simulator and it works, not sure if it's an issue with the Safari desktop developer tools.

I think this PR is relatively urgent as there are deprecated stacks live now but no indicator on the website. @neeraj-laad are you happy to merge with the alert and we open a future PR to improve the alert to a tooltip on mobile? This is how the alert looks on mobile right now when you tap the triangle:

Screenshot 2020-04-24 at 11 59 29

Copy link
Collaborator

@Bazif-Khan Bazif-Khan left a comment

Choose a reason for hiding this comment

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

Just found some small improvements and commented about it - Will let someone else to review and approve code changes.

Copy link
Contributor

@neeraj-laad neeraj-laad left a comment

Choose a reason for hiding this comment

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

Looks good to me. We can make the alert -> tooltip change in a separate PR.

Copy link
Collaborator

@Bazif-Khan Bazif-Khan left a comment

Choose a reason for hiding this comment

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

LGTM, as it's decided to make alert -> tooltip in a separate PR

@Bazif-Khan Bazif-Khan merged commit af907d1 into appsody:master Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants