Skip to content

refactor: add minimized load more#3399

Merged
ogzhanolguncu merged 5 commits intomainfrom
refactor-minimized-load-more
Jul 8, 2025
Merged

refactor: add minimized load more#3399
ogzhanolguncu merged 5 commits intomainfrom
refactor-minimized-load-more

Conversation

@ogzhanolguncu
Copy link
Contributor

@ogzhanolguncu ogzhanolguncu commented Jun 23, 2025

What does this PR do?

This PR:

  • Improves the load more footer component by adding the ability to collapse it into a compact, minimized state that sits in the bottom-right corner of the screen.
  • Adds 2 new icons for minimizing and maximizing to our icons package.
  • Replaces FramerMotion with hand crafted light weight animations

Fixes # (issue)

If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Check any of the log pages
  • Play around with pagination
  • Minimize and Maximize load more section
  • Make sure there is no regression

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary
Screenshot 2025-06-23 at 15 45 29 Screenshot 2025-06-23 at 15 45 26

Summary by CodeRabbit

  • New Features

    • Introduced two new icons: "Arrows to All Directions" and "Arrows to Center", now available for use in the icon set.
    • Enhanced the "Load More" footer with a collapsible/minimizable UI, allowing users to minimize the footer to a button and restore it as needed.
  • Style

    • Replaced animation effects in selection controls with CSS-based keyframe animations for smoother transitions and improved performance.

@changeset-bot
Copy link

changeset-bot bot commented Jun 23, 2025

⚠️ No Changeset found

Latest commit: 7645993

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 9:39am
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 9:39am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 23, 2025

Warning

Rate limit exceeded

@ogzhanolguncu has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 18 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6a63c3b and 7645993.

📒 Files selected for processing (1)
  • internal/icons/src/index.ts (1 hunks)
📝 Walkthrough

Walkthrough

The changes replace framer-motion-based animations with CSS keyframe animations in selection controls, add a collapsible UI state to the loading indicator footer, and introduce two new arrow icon components. The icons are also exported through the main icons index. No public API signatures were altered for existing components.

Changes

File(s) Change Summary
apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/_components/components/table/components/selection-controls/index.tsx Replaced framer-motion animations with CSS keyframes, removed digit-by-digit animation, simplified control flow.
apps/dashboard/components/virtual-table/components/loading-indicator.tsx Added collapsible/minimizable state, slide/fade CSS animations, and explicit null return for hide prop.
internal/icons/src/icons/arrows-to-all-directions.tsx
internal/icons/src/icons/arrows-to-center.tsx
Added two new React icon components: ArrowsToAllDirections and ArrowsToCenter.
internal/icons/src/index.ts Exported the new arrow icon components.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LoadMoreFooter
    participant UI

    User->>LoadMoreFooter: Render component
    alt hide prop is true
        LoadMoreFooter-->>UI: Render nothing (null)
    else isOpen is false
        LoadMoreFooter-->>UI: Render minimized button (bottom-right)
        User->>LoadMoreFooter: Click maximize
        LoadMoreFooter->>UI: Render expanded footer (bottom-center)
    else isOpen is true
        LoadMoreFooter-->>UI: Render expanded footer (bottom-center)
        User->>LoadMoreFooter: Click minimize
        LoadMoreFooter->>UI: Render minimized button (bottom-right)
        User->>LoadMoreFooter: Click "Load more"
        LoadMoreFooter->>UI: Trigger onLoadMore callback
    end
Loading

Suggested reviewers

  • perkinsjr
  • mcstepp
  • MichaelUnkey
  • chronark
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel vercel bot temporarily deployed to Preview – dashboard June 23, 2025 12:58 Inactive
@ogzhanolguncu ogzhanolguncu marked this pull request as ready for review June 23, 2025 13:02
@github-actions
Copy link
Contributor

github-actions bot commented Jun 23, 2025

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a5a947 and 6a63c3b.

📒 Files selected for processing (5)
  • apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/_components/components/table/components/selection-controls/index.tsx (4 hunks)
  • apps/dashboard/components/virtual-table/components/loading-indicator.tsx (2 hunks)
  • internal/icons/src/icons/arrows-to-all-directions.tsx (1 hunks)
  • internal/icons/src/icons/arrows-to-center.tsx (1 hunks)
  • internal/icons/src/index.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (9)
internal/icons/src/icons/arrows-to-center.tsx (1)

15-116: Well-implemented icon component following established patterns.

The ArrowsToCenter component correctly follows the standard icon component structure with proper prop handling, size mapping, and SVG construction. The geometric elements create a clear visual representation of arrows pointing inward.

internal/icons/src/icons/arrows-to-all-directions.tsx (1)

15-116: Consistent implementation with clear visual purpose.

The ArrowsToAllDirections component properly implements the outward-pointing arrows icon following the same established patterns as other icon components. The SVG geometry correctly represents the intended visual concept.

internal/icons/src/index.ts (1)

7-8: Proper export additions maintaining alphabetical order.

The new icon exports are correctly placed and follow the established export pattern.

apps/dashboard/app/(app)/apis/[apiId]/keys/[keyAuthId]/_components/components/table/components/selection-controls/index.tsx (3)

61-63: Cleaner early return logic.

The direct return null is more straightforward than the previous conditional rendering approach.


67-138: Effective migration from framer-motion to CSS animations.

The CSS keyframe animations provide a lightweight alternative to framer-motion while maintaining smooth transitions. The slideInFromTop and bounceIn animations are well-timed and appropriate for the UI context.


219-231: Simplified counter animation approach.

The refactored AnimatedCounter is cleaner and more performant than the previous digit-by-digit animation approach, while still providing visual feedback for value changes.

apps/dashboard/components/virtual-table/components/loading-indicator.tsx (3)

1-1: Appropriate icon usage for the minimize/maximize functionality.

The ArrowsToAllDirections and ArrowsToCenter icons effectively communicate the expand and collapse actions respectively.


31-42: Clean state management for collapsible functionality.

The isOpen state and toggle handlers are well-implemented with proper use of useCallback for performance optimization.


158-203: Comprehensive and well-crafted CSS animations.

The keyframe animations provide smooth, professional transitions that enhance the user experience. The timing functions and delays are well-balanced for a cohesive feel.

@vercel vercel bot temporarily deployed to Preview – engineering July 3, 2025 09:39 Inactive
@vercel vercel bot temporarily deployed to Preview – dashboard July 3, 2025 09:40 Inactive
@chronark
Copy link
Collaborator

chronark commented Jul 3, 2025

why are we doing this? what problem is this solving?

Copy link
Contributor Author

without minimizing, load more section blocks logs at the bottom

@chronark
Copy link
Collaborator

chronark commented Jul 7, 2025

but it still blocks them, just slightly less, right?

Copy link
Contributor Author

it is but much less it used to take entire middle section

@ogzhanolguncu ogzhanolguncu added this pull request to the merge queue Jul 8, 2025
Merged via the queue into main with commit 546e59a Jul 8, 2025
31 of 37 checks passed
@ogzhanolguncu ogzhanolguncu deleted the refactor-minimized-load-more branch July 8, 2025 13:16
chronark added a commit that referenced this pull request Jul 9, 2025
* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

* feat: onboarding key creation (#3459)

* feat: add new expandable configs

* feat: add form submit with conditionals

* feat: add description for each section and disable form

---------

Co-authored-by: James P <james@unkey.dev>

* refactor: add minimized load more (#3399)

* refactor: add minimized load more

* chore: fmt

* refactor: get rid of useEffect animation

* chore: fmt

* chore: llm search moved to ui (#3409)

* llm search moved with docs and replaced in dashboard

* eng docs change

* [autofix.ci] apply automated fixes

* minor refactor from c-rabbit

* rabbit

* [autofix.ci] apply automated fixes

* rabbit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>

* fix: calendar bug (#3478)

* fix: first time selection

* fix: resetting to initial date of the month

* fix: date validation issue

* fix: day selection by bypassing react-day-picker

* feat: return permission slugs (#3481)

* chore(release): version packages (#3482)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add listPermissions and listRoles (#3483)

* chore(release): version packages (#3484)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: Initial implementation of Unkey Deploy (#3488)

* feat: Initial implementation of Unkey Deploy

- Introduce four core services: assetmanagerd, billaged, builderd, metald
- Implement VM lifecycle management with Firecracker/Cloud Hypervisor support
- Add SPIFFE/SPIRE integration for mTLS inter-service communication
- Include systemd service files and CLI tools for each service
- Set up observability with OpenTelemetry and Grafana LGTM stack
- Implement tenant isolation, resource management, and usage billing

Signed-off-by: Ian Meyer <k@imeyer.io>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: cast JSON for interpolate params (#3492)

* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: Oğuzhan Olguncu <21091016+ogzhanolguncu@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>
Co-authored-by: CodeReaper <148160799+MichaelUnkey@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ian Meyer <imeyer@users.noreply.github.com>
Co-authored-by: Flo <53355483+Flo4604@users.noreply.github.com>
chronark added a commit that referenced this pull request Jul 9, 2025
* feat: get rid of testcontainers and just rawdog docker-compose

* feat: onboarding key creation (#3459)

* feat: add new expandable configs

* feat: add form submit with conditionals

* feat: add description for each section and disable form

---------

Co-authored-by: James P <james@unkey.dev>

* refactor: add minimized load more (#3399)

* refactor: add minimized load more

* chore: fmt

* refactor: get rid of useEffect animation

* chore: fmt

* chore: llm search moved to ui (#3409)

* llm search moved with docs and replaced in dashboard

* eng docs change

* [autofix.ci] apply automated fixes

* minor refactor from c-rabbit

* rabbit

* [autofix.ci] apply automated fixes

* rabbit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>

* fix: calendar bug (#3478)

* fix: first time selection

* fix: resetting to initial date of the month

* fix: date validation issue

* fix: day selection by bypassing react-day-picker

* feat: return permission slugs (#3481)

* chore(release): version packages (#3482)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add listPermissions and listRoles (#3483)

* chore(release): version packages (#3484)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: Initial implementation of Unkey Deploy (#3488)

* feat: Initial implementation of Unkey Deploy

- Introduce four core services: assetmanagerd, billaged, builderd, metald
- Implement VM lifecycle management with Firecracker/Cloud Hypervisor support
- Add SPIFFE/SPIRE integration for mTLS inter-service communication
- Include systemd service files and CLI tools for each service
- Set up observability with OpenTelemetry and Grafana LGTM stack
- Implement tenant isolation, resource management, and usage billing

Signed-off-by: Ian Meyer <k@imeyer.io>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: cast JSON for interpolate params (#3492)

* refactor: use docker-compose with testcontainers (#3476)

* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

* feat: onboarding key creation (#3459)

* feat: add new expandable configs

* feat: add form submit with conditionals

* feat: add description for each section and disable form

---------

Co-authored-by: James P <james@unkey.dev>

* refactor: add minimized load more (#3399)

* refactor: add minimized load more

* chore: fmt

* refactor: get rid of useEffect animation

* chore: fmt

* chore: llm search moved to ui (#3409)

* llm search moved with docs and replaced in dashboard

* eng docs change

* [autofix.ci] apply automated fixes

* minor refactor from c-rabbit

* rabbit

* [autofix.ci] apply automated fixes

* rabbit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>

* fix: calendar bug (#3478)

* fix: first time selection

* fix: resetting to initial date of the month

* fix: date validation issue

* fix: day selection by bypassing react-day-picker

* feat: return permission slugs (#3481)

* chore(release): version packages (#3482)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add listPermissions and listRoles (#3483)

* chore(release): version packages (#3484)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: Initial implementation of Unkey Deploy (#3488)

* feat: Initial implementation of Unkey Deploy

- Introduce four core services: assetmanagerd, billaged, builderd, metald
- Implement VM lifecycle management with Firecracker/Cloud Hypervisor support
- Add SPIFFE/SPIRE integration for mTLS inter-service communication
- Include systemd service files and CLI tools for each service
- Set up observability with OpenTelemetry and Grafana LGTM stack
- Implement tenant isolation, resource management, and usage billing

Signed-off-by: Ian Meyer <k@imeyer.io>

* [autofix.ci] apply automated fixes

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* fix: cast JSON for interpolate params (#3492)

* refactor: use docker-compose with testcontainerrefactos

* feat: get rid of testcontainers and just rawdog docker-compose

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: Oğuzhan Olguncu <21091016+ogzhanolguncu@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>
Co-authored-by: CodeReaper <148160799+MichaelUnkey@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ian Meyer <imeyer@users.noreply.github.com>
Co-authored-by: Flo <53355483+Flo4604@users.noreply.github.com>

* fix: clean up

---------

Signed-off-by: Ian Meyer <k@imeyer.io>
Co-authored-by: Oğuzhan Olguncu <21091016+ogzhanolguncu@users.noreply.github.com>
Co-authored-by: James P <james@unkey.dev>
Co-authored-by: CodeReaper <148160799+MichaelUnkey@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ian Meyer <imeyer@users.noreply.github.com>
Co-authored-by: Flo <53355483+Flo4604@users.noreply.github.com>
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.

2 participants