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

Listingpage static map #869

Merged
merged 7 commits into from
Jul 19, 2018
Merged

Listingpage static map #869

merged 7 commits into from
Jul 19, 2018

Conversation

Gnito
Copy link
Contributor

@Gnito Gnito commented Jul 18, 2018

NOTE 1: fuzzy location needs some extra work otherwise every page refresh is going to change the static map URL.

NOTE 2: map marker is moved to public/static/icons folder to be available for Google's static map API (works in production - localhost shows an error on top right corner of the generated map since the googleapis.com can't fetch the image from localhost.)


// Extract color from string. Given value should be either with '#' (e.g. #FFFFFF') or without it.
const formatColorFromString = color => {
if (typeof color !== 'string' && /^#[0-9A-F]{6}$/i.test(color)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What should the type be here if not string?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be typeof color === 'string'? Same thing also below.

Copy link
Contributor

@lyyder lyyder left a comment

Choose a reason for hiding this comment

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

Great work @Gnito! This must be one of the most impressive PRs I've seen in FTW 👏

// The resize event is flooded when the browser is resized. We'll
// use a small timeout to throttle changing the viewport since it
// will trigger rerendering.
const THROTTLE_WAIT_MS = 200;
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@Gnito Gnito merged commit 8270dcb into master Jul 19, 2018
@Gnito Gnito deleted the listingpage-static-map branch August 3, 2018 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants