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: add new .env variable "LANGFLOW_FEATURE_MVP_COMPONENTS" to show/hide integration sidebar components #4270

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Cristhianzl
Copy link
Collaborator

@Cristhianzl Cristhianzl commented Oct 24, 2024

Description
This pull request introduces a new .env variable: LANGFLOW_FEATURE_MVP_COMPONENTS. This variable will allow for the dynamic control of displaying or hiding the integration sidebar components based on the environment configuration.

Key Changes

  • Added a new environment variable LANGFLOW_MVP_COMPONENTS.
  • Updated logic in the sidebar component to check the value of LANGFLOW_FEATURE_MVP_COMPONENTS and conditionally display integration components.
  • Updated documentation to include instructions for using the new .env variable.

How to Use

  • Add LANGFLOW_FEATURE_MVP_COMPONENTS=true or LANGFLOW_FEATURE_MVP_COMPONENTS=false to your .env file.

  • When set to true, the integration sidebar components will be visible.

  • When set to false, the integration sidebar components will be hidden.

…uthentication

🔧 (api.tsx): Replace universal-cookie import with react-cookie for consistency
🔧 (authStore.ts): Replace universal-cookie import with react-cookie for consistency
🔧 (use-get-global-variables.ts): Add check to only fetch global variables if user is authenticated
✨ (use-get-mutation-global-variables.ts): Add mutation function to fetch and update global variables
🔧 (authStore.ts): Replace universal-cookie import with react-cookie for consistency
📝 (endpoints.py): modify get_config function to include feature_flags in the response
📝 (feature_flags.py): add mvp_components field to FeatureFlags settings
📝 (schemas.py): add feature_flags field to ConfigResponse schema
…rface to support feature flags in the application

🔧 (utilityStore.ts): Add featureFlags field and setFeatureFlags function to utilityStore to manage feature flags in the application
💡 (extraSidebarComponent/index.tsx): Use featureFlags from utilityStore to conditionally render components based on feature flags in ExtraSidebar component
…de-supported package to clean up unnecessary information
…rect visibility of integrations in the sidebar based on the value of mvp_components.
…o use feature_flags object for mvp_components flag for better readability and maintainability.
@Cristhianzl Cristhianzl self-assigned this Oct 24, 2024
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request labels Oct 24, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Oct 24, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request documentation Improvements or additions to documentation labels Oct 24, 2024
@codenprogressive
Copy link

Hi @Cristhianzl wondering if this PR will cover this request: #2597 ?

src/backend/base/langflow/api/v1/endpoints.py Outdated Show resolved Hide resolved
src/backend/base/langflow/api/v1/schemas.py Outdated Show resolved Hide resolved
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Oct 24, 2024
@dosubot dosubot bot removed the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 24, 2024
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 24, 2024
@Cristhianzl
Copy link
Collaborator Author

Hi @Cristhianzl wondering if this PR will cover this request: #2597 ?

hey @codenprogressive, I'm sorry, but no!
This is to show/hide some bundles that we have hidden (Notion and AssemblyAI)

Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 27, 2024
@Cristhianzl Cristhianzl enabled auto-merge (squash) October 27, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants