Skip to content

[Uptime] Fix/location map hide layer view control#53568

Merged
shahzad31 merged 11 commits intoelastic:masterfrom
shahzad31:fix/location-map-hide-layer-view-control
Jan 6, 2020
Merged

[Uptime] Fix/location map hide layer view control#53568
shahzad31 merged 11 commits intoelastic:masterfrom
shahzad31:fix/location-map-hide-layer-view-control

Conversation

@shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Dec 19, 2019

Summary

Fixes: #53563

This PR will hide view/layer control from location map in details panel.

After:

image

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@shahzad31 shahzad31 self-assigned this Dec 19, 2019
@shahzad31 shahzad31 added release_note:skip Skip the PR/issue when compiling release notes v7.6.0 v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Dec 19, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

Had a few questions/refinements, but the overall changes looks good. Keeps us going in the right direction, so excited to see this page getting more and more ❤️ over time!

import { UptimeSettingsContext } from '../../../contexts';

const TextStyle = styled.div`
text-transform: uppercase;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want this? The screenshot in the issue has a location (I think it was Japan) like Japan.

On my screen my locations render like this:
image

I found it kind of unsettling when I saw them in caps, as I've specified them like Fairbanks and Us-east-2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i agree, i also got chance to discuss with andrew, so have remote the caps.

`;

interface Props {
monitorLocations: any;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we declare this prop as monitorLocations: any[] (or just name it locations) and pass monitorLocations?.locations ?? [] from the parent? That way we can avoid the nesting below and we won't be calling forEach on an any type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

});
}
return (
<TagContainer>
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this look when there are no locations specified? Do we need an alternate render (or null), or is it ok with no children returned by the map calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think it's fine, it's not obstructive.

@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

@shahzad31
Copy link
Contributor Author

@justinkambic i took care of your comments, you can re-review this now.

@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

LGTM - one code change recommended

export const getLayerList = (
upPoints: LocationPoint[],
downPoints: LocationPoint[],
{ gray, danger }: { gray: string; danger: string }
Copy link
Contributor

Choose a reason for hiding this comment

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

There's actually an UptimeAppColors type that we could use here instead of declaring the interface inline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have taken care of this code change in my other related PR to this file. So i will merge this.

@shahzad31 shahzad31 merged commit e4ccf19 into elastic:master Jan 6, 2020
@shahzad31 shahzad31 deleted the fix/location-map-hide-layer-view-control branch January 6, 2020 15:55
shahzad31 added a commit that referenced this pull request Jan 13, 2020
* hide layer control and added loc tags

* update test

* remove unused comment

* remove capitalization

* style fix

* update types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.6.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Uptime] Hide View/Layer Control in Location Map on details pages(Redesign)

4 participants