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

feat: global availability block #514

Merged
merged 7 commits into from
May 30, 2024
Merged

feat: global availability block #514

merged 7 commits into from
May 30, 2024

Conversation

fkakatie
Copy link
Member

@fkakatie fkakatie commented May 15, 2024

Description

more dynamic map of global availability

  • a SVG overlaid with the coordinates from a locations spreadsheet
  • if you hover over a pin, it shows you the name of the city
  • if you don’t hover, every 6 seconds a different city lights up
  • source SVG is a 160 KB equirectangular borderless world map from wikimedia

How Has This Been Tested?

https://avail-block--helix-website--adobe.aem.page/drafts/fkakatie/global

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

aem-code-sync bot commented May 15, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@fkakatie fkakatie requested a review from trieloff May 15, 2024 22:43
Copy link

aem-code-sync bot commented May 15, 2024

Page Scores Audits Google
/drafts/fkakatie/global PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@fkakatie fkakatie marked this pull request as ready for review May 21, 2024 16:40
@fkakatie fkakatie changed the title test: global availability block feat: global availability block May 21, 2024
@fkakatie fkakatie requested a review from kptdobe May 22, 2024 14:30
Copy link
Contributor

@kptdobe kptdobe left a comment

Choose a reason for hiding this comment

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

I approved because code looks good (at least visual result is great). But you should write a little bit of JS doc / comments because some parts look tricky and deserve some explanation. Think about someone else having to fix this code.

setTimeout(() => {
if (svg.dataset.auto === 'true') unfocusPin(tooltip, svg);
setTimeout(() => {
iterateThroughPins(pins, svg, tooltip, randomIndex); // recursive call to focus another pin
Copy link
Contributor

Choose a reason for hiding this comment

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

This creates an infinite loop.
Writing some minimal doc to explain the method would help understand this is expected and desired.

return randomIndex;
}

function tooltipAfterOverride(tooltip, axis, pixels) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method contains a lot of maths, but it is not obvious what it is doing or why it is needed...

import { createTag } from '../../scripts/scripts.js';

function generateRandomNumber(max, excluding) {
// minimum is inclusive, maximum is exclusive
Copy link
Contributor

Choose a reason for hiding this comment

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

No minimum... ? What is excluding ?

Copy link
Contributor

@kptdobe kptdobe left a comment

Choose a reason for hiding this comment

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

Thanks, much easier to understand now!

@fkakatie fkakatie merged commit 9297236 into main May 30, 2024
4 checks passed
@fkakatie fkakatie deleted the avail-block branch May 30, 2024 18:15
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.

None yet

3 participants