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(extension): allow hiding dapps based on feature flag config [LW-11883] #1653

Open
wants to merge 2 commits into
base: feat/LW-11882-connect-to-dapp-radar
Choose a base branch
from

Conversation

przemyslaw-wlodek
Copy link
Contributor

Checklist

  • JIRA
  • Proper tests implemented

Proposed solution

  • introduce Feature Flag payload validation
  • allow defining types for custom payloads
  • improve error handling
  • add new method PostHogClient.getFeatureFlagPayload()

Testing

Change the dapp-explorer feature flag config and see how/if Dapps are rendered

@pczeglik-iohk
Copy link
Contributor

pczeglik-iohk commented Jan 17, 2025

Allure Report

allure-report-publisher generated test report!

processReports: ❌ test report for 23122e20

passed failed skipped flaky total result
Total 31 3 3 0 37

@szymonmaslowski szymonmaslowski force-pushed the feat/LW-11882-connect-to-dapp-radar branch from a80d784 to 78be196 Compare January 17, 2025 15:51
@przemyslaw-wlodek przemyslaw-wlodek force-pushed the feat/LW-11883-hide-dapps-using-feature-flags branch 5 times, most recently from 69822ea to 9cf2359 Compare January 20, 2025 10:14
Copy link
Contributor

@szymonmaslowski szymonmaslowski left a comment

Choose a reason for hiding this comment

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

LGTM. Leaving a few comments.

@@ -35,6 +35,9 @@ inputs:
BLOCKFROST_PROJECT_ID_SANCHONET:
description: 'SanchoNet Project ID for Blockfrost API usage'
required: true
DAPP_RADAR_API_KEY:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this change. Intentionally we want to set the api key only in the release job which does not use this action templeate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I think it was a rebase mistake.

Comment on lines 387 to 390
(payloadsByFeatureTotal, featureFlagName) => ({
...payloadsByFeatureTotal,
[featureFlagName]: false
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
(payloadsByFeatureTotal, featureFlagName) => ({
...payloadsByFeatureTotal,
[featureFlagName]: false
}),
(payloadsByFeatureTotal, featureFlagName) => {
payloadsByFeatureTotal[featureFlagName] = false;
return payloadsByFeatureTotal;
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, I agree. It has the same effect but optimized 👍🏻

szymonmaslowski and others added 2 commits January 20, 2025 17:27
- introduce Feature Flag payload validation
- allow defining types for custom payloads
- improve error handling
- add new method PostHogClient.getFeatureFlagPayload()
@szymonmaslowski szymonmaslowski force-pushed the feat/LW-11883-hide-dapps-using-feature-flags branch from 9cf2359 to 23122e2 Compare January 20, 2025 16:30
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.

3 participants