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: batch actions #431

Merged
merged 10 commits into from
Apr 26, 2023
Merged

feat: batch actions #431

merged 10 commits into from
Apr 26, 2023

Conversation

Candinya
Copy link
Member

@Candinya Candinya commented Apr 25, 2023

WHAT

🤖 Generated by Copilot at 318ddc9

Added a batch selection feature to the PagesManager component that allows users to perform actions on multiple pages at once. Created a new PagesManagerSelectHeader component that handles the logic and UI for the feature. Modified the page item buttons and layout to support batch selection. Updated the hooks and queries to work with the new feature.

🤖 Generated by Copilot at 318ddc9

Sing, O Muse, of the skillful coder who devised
A clever way to manage many pages at once,
With PagesManagerSelectHeader, a new component, he surprised
His peers, who praised his work with generous response.

WHY

HOW

🤖 Generated by Copilot at 318ddc9

  • Import useState hook and PagesManagerSelectHeader component to enable batch selection feature (link)
  • Add batchSelected state and setBatchSelected function to store and update the IDs of the selected pages (link)
  • Render PagesManagerSelectHeader conditionally based on the length of batchSelected and pass the relevant props to it (link)
  • Add selection button to each page item that toggles the page ID in batchSelected and prevents default link behavior (link)
  • Move menu button to the right and align it with the center of the page item for better layout (link)
  • Create PagesManagerSelectHeader component in a new file that handles the logic and UI for the batch selection feature (link)
  • Use hooks to access translation, router, query client, and mutation functions for converting and deleting pages (link)
  • Define tabItems array that contains the text and onClick functions for each tab (link)
  • Render Tabs component with tabItems prop (link)

CLAIM REWARDS

For first-time contributors, please leave your xLog address and Discord ID below to claim your rewards.

@vercel
Copy link

vercel bot commented Apr 25, 2023

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

Name Status Preview Comments Updated (UTC)
xlog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2023 4:07pm

@github-actions
Copy link

📦 Next.js Bundle Analysis for xlog

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 699.97 KB (🟡 +110 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/dashboard/[subdomain]/pages 2.33 MB 3.01 MB 881.74% (🟡 +0.14%)
/dashboard/[subdomain]/posts 2.33 MB 3.01 MB 881.74% (🟡 +0.14%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@Candinya Candinya changed the title 🚧 feat: batch actions feat: batch actions Apr 26, 2023
@github-actions
Copy link

📦 Next.js Bundle Analysis for xlog

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 699.97 KB (🟡 +112 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/dashboard/[subdomain]/pages 2.33 MB 3.01 MB 881.81% (🟡 +0.14%)
/dashboard/[subdomain]/posts 2.33 MB 3.01 MB 881.81% (🟡 +0.14%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

package.json Outdated Show resolved Hide resolved
…-selection"

This reverts commit 338dad3, reversing
changes made to 3907f59.
@github-actions
Copy link

📦 Next.js Bundle Analysis for xlog

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 700.13 KB (🟡 +110 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/dashboard/[subdomain]/pages 2.33 MB 3.01 MB 881.85% (🟡 +0.15%)
/dashboard/[subdomain]/posts 2.33 MB 3.01 MB 881.85% (🟡 +0.15%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link

📦 Next.js Bundle Analysis for xlog

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 700.14 KB (🟡 +112 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/dashboard/[subdomain]/pages 2.34 MB 3.03 MB 885.91% (🟡 +0.16%)
/dashboard/[subdomain]/posts 2.34 MB 3.03 MB 885.91% (🟡 +0.16%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@DIYgod DIYgod merged commit a49778b into dev Apr 26, 2023
4 checks passed
@DIYgod DIYgod deleted the feat/batch-selection branch April 26, 2023 21:33
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.

None yet

2 participants