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

Image Web/Desktop: Add support for http headers #34505

Merged

Commits on Jan 15, 2024

  1. Refactor Image for Web/Desktop with Source Headers

    - Introduced `BaseImage` component that branches between native and web implementations.
        - **Native**: Utilizes `FastImage` directly.
        - **Web**: Minor adjustments made to the `onLoad` event signature for compatibility.
    - Eliminated `Image/index.native.js` as both native and web components now leverage a unified high-level implementation for image loading and rendering.
    
    (cherry picked from commit 2aa37d2)
    kidroca committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    eb8c81f View commit details
    Browse the repository at this point in the history
  2. Add react-native-web patch for image header support

    (cherry picked from commit 19b605e)
    kidroca committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    37df3e3 View commit details
    Browse the repository at this point in the history
  3. refactor(components): Exclude Auth Token for External Avatar Images

    This patch focuses on resolving issues encountered with avatar image loading, specifically addressing the challenges related to CORS (Cross-Origin Resource Sharing) errors.
    
    Changes:
    - Removed the `isAuthTokenRequired` flag from the `AttachmentModal` component in various files, including `ProfilePage.js`, `RoomHeaderAvatars.js`, and `DetailsPage.js`. This change is crucial for loading of avatar images that are hosted externally.
    
    Rationale:
    - The primary purpose of this modification is to streamline the loading process for avatars by removing the unnecessary inclusion of authentication tokens in requests for external images. This approach aligns with standard practices for handling externally hosted content and aims to enhance compatibility and performance.
    - Raised a question here as whether there are cases of avatar images that need authentication: https://github.com/Expensify/App/pull/24425/files#r1404352872
    
    This update is expected to resolve the CORS errors associated with avatar image loading, thereby improving the overall functionality and user experience in our application.
    
    (cherry picked from commit cc49208)
    kidroca committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    d598291 View commit details
    Browse the repository at this point in the history
  4. Align changes with project code styles

    (cherry picked from commit 1182c7d)
    kidroca committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    56497e5 View commit details
    Browse the repository at this point in the history
  5. Refactor BaseImage.native.js to Align with expo-image Deprecation

    - Adapt to `expo-image` deprecation of `event.nativeEvent` usage.
    - Directly use the event object as recommended.
    - Ensure compatibility with components using the `onLoad` prop.
    kidroca committed Jan 15, 2024
    Configuration menu
    Copy the full SHA
    5d46092 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d51126f View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. Add BaseImage specific props

    kidroca committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    c6b3b23 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    4487ccc View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. Merge branch 'main' into kidroca/feat/attachment-with-headers

    # Conflicts:
    #	src/components/RoomHeaderAvatars.js
    #	src/pages/ProfilePage.js
    kidroca committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    7c5bb30 View commit details
    Browse the repository at this point in the history