1. 05.03.2024 9 коммитов
  2. 04.03.2024 7 коммитов
  3. 03.03.2024 1 коммит
  4. 01.03.2024 4 коммита
  5. 29.02.2024 9 коммитов
  6. 28.02.2024 8 коммитов
  7. 27.02.2024 2 коммита
    • Peng Xiao's avatar
      refactor(component): use react-transition-state to simplify exit animation (#5923)
      · 14880787
      Peng Xiao создал
      ## **User description**
      use react-transition-state to simplify exit animation
      
      ___
      
      ## **Type**
      enhancement
      
      ___
      
      ## **Description**
      - Integrated `react-transition-state` for managing animations in `ResizePanel` and `CMDKModal` components, simplifying the code and improving maintainability.
      - Introduced a shared animation timeout variable to standardize animation durations across components.
      - Added `react-transition-state` to dependencies to enable the new animation handling.
      
      ___
      
      ## **Changes walkthrough**
      <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
      <tr>
        <td>
          <details>
            <summary><strong>resize-panel.tsx</strong><dd><code>Integrate `react-transition-state` for Resize Panel Animations</code></dd></summary>
      <hr>
      
      packages/frontend/component/src/components/resize-panel/resize-panel.tsx
      
      <li>Introduced <code>useTransition</code> hook from <code>react-transition-state</code> for managing <br>animations.<br> <li> Added a constant for animation timeout and applied it to the <br>transition.<br> <li> Utilized the transition state to toggle the open state of the resize <br>panel.<br>
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-a4d6e633862f63f97c167ff41ba62aff8aebf3e3b2f6e7ce13d5a0e22e8ff287">+12/-0</a>&nbsp; &nbsp; </td>
      
      </tr>
      
      <tr>
        <td>
          <details>
            <summary><strong>modal.css.ts</strong><dd><code>Use Variable for Animation Timeout in Modal CSS</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
      <hr>
      
      packages/frontend/core/src/components/pure/cmdk/modal.css.ts
      
      <li>Created a variable for animation timeout.<br> <li> Updated animation durations to use the new timeout variable.<br>
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-ba8935611b9c1695153d92d08ecb0f7dac73a6197f54ccda5a6e791902cd651d">+6/-3</a>&nbsp; &nbsp; &nbsp; </td>
      
      </tr>
      
      <tr>
        <td>
          <details>
            <summary><strong>modal.tsx</strong><dd><code>Simplify CMDK Modal Animation with `react-transition-state`</code></dd></summary>
      <hr>
      
      packages/frontend/core/src/components/pure/cmdk/modal.tsx
      
      <li>Replaced custom animation state management with <code>useTransition</code> hook.<br> <li> Removed old animation state logic and simplified the component.<br> <li> Added animation timeout variable and applied it to the transition.<br>
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-ab3fe66c9b1d3a691fafd1aebc9988e840fedfcd09b5b89570838a5a2a9469c9">+13/-33</a>&nbsp; </td>
      
      </tr>
      </table></td></tr><tr><td><strong>Dependencies</strong></td><td><table>
      <tr>
        <td>
          <details>
            <summary><strong>package.json</strong><dd><code>Add `react-transition-state` Dependency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
      <hr>
      
      packages/frontend/core/package.json
      
      - Added `react-transition-state` as a dependency.
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5923/files#diff-23e0e5dc0ceb004a0a5d3d13e7d00545de7487535ca0e5eab4c5047f1e24eff0">+1/-0</a>&nbsp; &nbsp; &nbsp; </td>
      
      </tr>
      </table></td></tr></tr></tbody></table>
      
      ___
      
      > ✨ **PR-Agent usage**:
      >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
      14880787
    • LongYinan's avatar
      build(electron): fix dmg maker (#5922)
      · c724b3fe
      LongYinan создал
      ## **Type**
      enhancement
      
      ___
      
      ## **Description**
      - Introduced a custom DMG packaging solution `@affine/appdmg-patch` for Electron applications.
      - Implemented a new TypeScript class `MakerDmg` to handle the custom packaging logic, including support for custom backgrounds, icons, and app positioning within the DMG.
      - Updated Electron Forge configuration to use the new `@affine/appdmg-patch` package instead of `@electron-forge/maker-dmg`.
      - Adjusted package dependencies in `packages/frontend/electron/package.json`, adding `@affine/appdmg-patch` and removing `@electron-forge/maker-dmg`.
      
      ___
      
      ## **Changes walkthrough**
      <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement
      </strong></td><td><table>
      <tr>
        <td>
          <details>
            <summary><strong>index.ts</strong><dd><code>Implement Custom DMG Packaging Logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
      <hr>
      
      tools/appdmg-patch/index.ts
      
      <li>Introduced a new class <code>MakerDmg</code> extending <code>MakerBase</code> with support for <br>custom DMG packaging.<br> <li> Implemented custom DMG packaging logic including background, icon, and <br>app positioning.<br> <li> Added support for custom <code>contents</code> configuration to define the DMG <br>layout.<br>
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5922/files#diff-96a537c04a2a740dca542688b3e6a65c67e6cf339b146bf0a9c49008ad58ea77">+80/-0</a>&nbsp; &nbsp; </td>
      
      </tr>
      </table></td></tr><tr><td><strong>Configuration changes
      </strong></td><td><table>
      <tr>
        <td>
          <details>
            <summary><strong>forge.config.mjs</strong><dd><code>Update Electron Forge Configuration for Custom DMG Packaging</code></dd></summary>
      <hr>
      
      packages/frontend/electron/forge.config.mjs
      
      <li>Replaced <code>@electron-forge/maker-dmg</code> with <code>@affine/appdmg-patch</code> in the <br>makers configuration.<br> <li> Adjusted DMG icon size and background configuration.<br>
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5922/files#diff-bd3343a702deabb8f5f6f77e34fbc215615538875f59b68d82612c0f5ed532a3">+2/-3</a>&nbsp; &nbsp; &nbsp; </td>
      
      </tr>
      
      <tr>
        <td>
          <details>
            <summary><strong>package.json</strong><dd><code>Introduce Package Configuration for Custom DMG Packaging</code>&nbsp; </dd></summary>
      <hr>
      
      tools/appdmg-patch/package.json
      
      <li>Created a new package <code>@affine/appdmg-patch</code> with necessary dependencies <br>for custom DMG packaging.<br>
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5922/files#diff-395b189951512e67d55b0abc55a167f014f239f608ec5b180f9c7d48e1ea9e8b">+16/-0</a>&nbsp; &nbsp; </td>
      
      </tr>
      </table></td></tr><tr><td><strong>Dependencies
      </strong></td><td><table>
      <tr>
        <td>
          <details>
            <summary><strong>package.json</strong><dd><code>Update Package Dependencies for Electron Frontend</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
      <hr>
      
      packages/frontend/electron/package.json
      
      <li>Added <code>@affine/appdmg-patch</code> to <code>devDependencies</code>.<br> <li> Removed <code>@electron-forge/maker-dmg</code> from <code>devDependencies</code>.<br>
      
      </details>
      
        </td>
        <td><a href="https:/toeverything/AFFiNE/pull/5922/files#diff-37323e9da5e4b1606abb6eb8e5ff1516ae5fce925bceaafeeade61bd80c0b62d">+1/-1</a>&nbsp; &nbsp; &nbsp; </td>
      
      </tr>
      </table></td></tr></tr></tbody></table>
      
      ___
      
      > ✨ **PR-Agent usage**:
      >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
      c724b3fe