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: feature flags: Add feature flag config for Octuple #875

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

dcoblentz-eightfold
Copy link
Contributor

Add a feature flag config for octuple which can provide a mechanism to provide default behavior for Octuple components.

SUMMARY:

This adds a feature flag config, and creates one flag that can control the way that Panels are rendered

GITHUB ISSUE (Open Source Contributors)

JIRA TASK (Eightfold Employees Only):

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

Open the panel in storybook, and toggle the lazyLoadPanelContent flag in the settings. You should be able to see that the panel contents are rendered or not rendered even when the panel is not visible

Add option to lazy load panels by default
Copy link

codesandbox-ci bot commented Aug 20, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@gclark-eightfold
Copy link
Contributor

I'm curious if this is the direction we want to go in for shipping Octuple changes faster.
I can see how feature flags can help land breaking changes into Octuple without massive efforts on regression testing, but I think we're also increasing our surface area for testing in the future.

Also, it might be a bit more complex to debug if component-level props are being ignored for context-level props.

If we decide we want to continue with feature flags though, I think we should:

  1. Separating it out a bit more by component name might make it easier to follow & make it clear which feature flags pertain to look for if debugging is necessary.
  2. Add JSDoc comments to each feature flag to indicate what it does / when to use it.
    e.g.
export interface FeatureFlags {
  panel?: {
    /**
     * If `true`, the panel content will render ONLY when `visible` is `true`.
     * Otherwise, the panel content will default to the `renderContentAlways` value.
     * 
     * < some information about when/why this should be used >
     */
    lazyLoadContent?: boolean;
  }
}

@dcoblentz-eightfold
Copy link
Contributor Author

:shipit:

@dcoblentz-eightfold dcoblentz-eightfold merged commit 9fc6b07 into EightfoldAI:main Aug 22, 2024
3 of 4 checks passed
jhoward-eightfold pushed a commit that referenced this pull request Aug 27, 2024
* feat: feature flags: Add feature flag config for Octuple

Add option to lazy load panels by default

* rename property

* add jsdoc for the flag
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