[PR #23555] Fix/footer behavior #30302

Closed
opened 2026-02-21 20:47:14 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/23555

State: closed
Merged: Yes


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

part of https://github.com/langgenius/dify/pull/22927

This pull request refactors how the Footer component is rendered in the apps section. The logic for conditionally displaying the footer based on branding settings has been moved from the Apps component to the List component. Additionally, the footer's close button and its associated state management have been removed, making the footer always visible when rendered.

Refactoring and component logic changes:

  • Moved the conditional rendering of the Footer component from web/app/components/apps/index.tsx to web/app/components/apps/list.tsx, centralizing the logic and simplifying the parent component. [1] [2] [3]
  • Updated web/app/components/apps/list.tsx to import Footer and useGlobalPublicStore, and to use the systemFeatures.branding.enabled flag to control footer visibility. [1] [2] [3]

Footer component simplification:

  • Removed the close button and related state (isVisible, setIsVisible, and handleClose) from the Footer component, so the footer is always displayed when rendered. [1] [2]

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/23555 **State:** closed **Merged:** Yes --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 2. Ensure there is an associated issue and you have been assigned to it > 3. Use the correct syntax to link this PR: `Fixes #<issue number>`. ## Summary part of https://github.com/langgenius/dify/pull/22927 This pull request refactors how the `Footer` component is rendered in the apps section. The logic for conditionally displaying the footer based on branding settings has been moved from the `Apps` component to the `List` component. Additionally, the footer's close button and its associated state management have been removed, making the footer always visible when rendered. **Refactoring and component logic changes:** * Moved the conditional rendering of the `Footer` component from `web/app/components/apps/index.tsx` to `web/app/components/apps/list.tsx`, centralizing the logic and simplifying the parent component. [[1]](diffhunk://#diff-7bcea1d284a1ab634161ce066bc80ed318d12a187fe58a612bbbc8697e72b532L3-L21) [[2]](diffhunk://#diff-93f7af05c419974ddd0d9400b68700fde76d128636f9620d15440a4f2704283eR35-R36) [[3]](diffhunk://#diff-93f7af05c419974ddd0d9400b68700fde76d128636f9620d15440a4f2704283eR235-R237) * Updated `web/app/components/apps/list.tsx` to import `Footer` and `useGlobalPublicStore`, and to use the `systemFeatures.branding.enabled` flag to control footer visibility. [[1]](diffhunk://#diff-93f7af05c419974ddd0d9400b68700fde76d128636f9620d15440a4f2704283eR35-R36) [[2]](diffhunk://#diff-93f7af05c419974ddd0d9400b68700fde76d128636f9620d15440a4f2704283eR71) [[3]](diffhunk://#diff-93f7af05c419974ddd0d9400b68700fde76d128636f9620d15440a4f2704283eR235-R237) **Footer component simplification:** * Removed the close button and related state (`isVisible`, `setIsVisible`, and `handleClose`) from the `Footer` component, so the footer is always displayed when rendered. [[1]](diffhunk://#diff-ef7c32c5a63d5f55b451f89439f7248ed4009ecb0467f956f8b86a53a44c4e60L1-R3) [[2]](diffhunk://#diff-ef7c32c5a63d5f55b451f89439f7248ed4009ecb0467f956f8b86a53a44c4e60L29-L46) ## Screenshots | Before | After | |--------|-------| | ... | ... | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:47:14 -05:00
yindo closed this issue 2026-02-21 20:47:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30302