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

Various Improvements and bugfixes related to caching #895

Merged
merged 12 commits into from May 16, 2023
Merged

Conversation

ajnart
Copy link
Owner

@ajnart ajnart commented May 15, 2023

🤖 Generated by Copilot at 599ccda

Summary

✨🐛💄

This pull request enhances the user feedback, cache management, and performance of various components and hooks related to configurations, widgets, and icons. It also fixes a typo in the ConfigActions component and adds a portal prop to the IconSelector component. The main files affected are ConfigChanger.tsx, useCopyConfigMutation.tsx, CalendarTile.tsx, IconSelector.tsx, ConfigActions.tsx, and useGetDashboardIcons.tsx.

Sing, O Muse, of the skillful coder who changed the dashboard's face
With props and hooks and portals, he adorned the icons' place
He fixed the typo in the response, and added staleTime too
And gave the user feedback, with notifications and icons new

Walkthrough

  • Import modules for notifications and icons (link)
  • Add notification logic to handleConfigChange function (link)
  • Use portal to render icons in IconSelector component (link)
  • Fix typo in response object (link)
  • Import queryClient object (link)
  • Invalidate query for getting all configurations on copy success (link)
  • Add staleTime option to useGetDashboardIcons hook (link)
  • Import and use useEditModeStore hook (link)
  • Conditionally enable or disable query for calendar media data (link)

This commit adds the functionality of query invalidation
- when a config is created
- when the calendar options are changed

It also makes it so the calendar doesn't update if the widget is currently being edited
This will allow for easier search in IDEs
- vscode hides gitignored files
- new contributors won't push translations using JSON anymore
Added the `withinPortal` option so that it doesn't clip into the underlying modal
It would always return error previously. That has been fixed.
@vercel
Copy link

vercel bot commented May 15, 2023

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

Name Status Preview Comments Updated (UTC)
homarr ❌ Failed (Inspect) May 15, 2023 8:24am

@ajnart ajnart changed the title Cache invalidation Various Improvements and bugfixes related to caching May 15, 2023
@ajnart ajnart requested a review from manuel-rw May 15, 2023 07:27
ajnart and others added 3 commits May 15, 2023 17:10
* 🚧 Bookmark widget

* ✨ Add input type

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>

* ✨ Add content display and input fields

* 🐛 Fix delete button updating to invalid schema

* 🌐 Add translations for options

* ✨ Add field for image

* ♻️ Refactor IconSelector and add forward ref

* 🦺 Add form validation

* 🦺 Add validation for icon url and fix state for icon picker

* 🌐 PR feedback

---------

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
@vercel
Copy link

vercel bot commented May 16, 2023

Deployment failed with the following error:

Resource is limited - try again in 2 hours (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented May 16, 2023

Deployment failed with the following error:

Resource is limited - try again in 1 hour (more than 100, code: "api-deployments-free-per-day").

@github-actions
Copy link

📦 Next.js Bundle Analysis for homarr

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 365.17 KB (🟡 +3.96 KB)
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!

Four Pages Changed Size

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

Page Size (compressed) First Load
/ 78.67 KB (🟡 +3.33 KB) 443.84 KB
/[slug] 78.68 KB (🟡 +3.33 KB) 443.85 KB
/login 1.15 KB (🟡 +70 B) 366.32 KB
/migrate 8.17 KB (🟡 +465 B) 373.34 KB
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

Next to the size is how much the size has increased or decreased compared with the base branch of this 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.

@ajnart ajnart merged commit 9658448 into dev May 16, 2023
4 of 5 checks passed
@ajnart ajnart deleted the cache-invalidation branch May 16, 2023 06:04
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