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

fix: make vendor randomly selected in marketplace #721

Merged
merged 1 commit into from
Jul 2, 2022

Conversation

zdtsw
Copy link
Contributor

@zdtsw zdtsw commented Jul 1, 2022

Fixes: #510

Checklist
  • npm test passes
  • documentation is changed or added (if applicable)
  • permission has been obtained to add new logo (if applicable)
  • contribution guidelines followed here

@netlify
Copy link

netlify bot commented Jul 1, 2022

Deploy Preview for eclipsefdn-adoptium-v2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8051115
🔍 Latest deploy log https://app.netlify.com/sites/eclipsefdn-adoptium-v2/deploys/62bef8c8b786dc000832432a
😎 Deploy Preview https://deploy-preview-721--eclipsefdn-adoptium-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@zdtsw
Copy link
Contributor Author

zdtsw commented Jul 2, 2022

Screenshot from 2022-07-02 08-57-29
Screenshot from 2022-07-02 08-56-50

@gdams gdams merged commit 4dcf5dc into adoptium:main Jul 2, 2022
Copy link
Contributor

@tellison tellison left a comment

Choose a reason for hiding this comment

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

Questions in lined.
Maybe unlucky/ but even forced refresh doesn't constantly change the order for me.

@@ -3,6 +3,12 @@ import * as React from "react"
import vendors from '../../json/marketplace.json';
import './VendorSelector.scss';

// Shuffle vendors
for (let i = vendors.length - 1; i > 0; i--) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not shuffle the 0-th element too? i.e. i >= 0

@tellison
Copy link
Contributor

tellison commented Jul 4, 2022

@zdtsw apologies for the late review

@sxa sxa mentioned this pull request Jul 12, 2022
@tellison tellison mentioned this pull request Jul 12, 2022
4 tasks
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.

Marketplace vendor selector should randomise order
3 participants