-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add optional email field for feedback, record feedback in db #1695
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for toiletmapThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
197.28 KB (🟡 +153 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!
Seven 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 (200 KB ) |
---|---|---|---|
/ |
12.19 KB |
209.48 KB | 104.74% (+/- <0.01%) |
/explorer/loos/[id] |
16.4 KB |
213.69 KB | 106.84% (🟡 +0.01%) |
/explorer/search |
16.83 KB |
214.11 KB | 107.05% (+/- <0.01%) |
/loos/[id] |
20.32 KB |
217.6 KB | 108.80% (+/- <0.01%) |
/loos/[id]/edit |
45.79 KB |
243.07 KB | 121.54% (🟢 -0.01%) |
/loos/[id]/remove |
16.11 KB |
213.39 KB | 106.70% (+/- <0.01%) |
/loos/add |
45.27 KB |
242.55 KB | 121.28% (🟢 -0.02%) |
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 10% 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.
GBPTM Run #1330
Run Properties:
|
Project |
GBPTM
|
Branch Review |
refs/pull/1695/merge
|
Run status |
Passed #1330
|
Run duration | 03m 10s |
Commit |
e9c22e2d77 ℹ️: Merge cdf437d53c08419bee8c81ef9a2e447284aa28a5 into 5152c959bb2fa58757ceed0d0f71...
|
Committer | Oliver Barnwell |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
63
|
View all changes introduced in this branch ↗︎ |
ef8df4a
to
974464e
Compare
📦 Next.js Bundle Analysis for toiletmapThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
197.28 KB (🟡 +277 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!
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 | % of Budget (200 KB ) |
---|---|---|---|
/explorer/loos/[id] |
16.4 KB |
213.67 KB | 106.84% (🟢 -0.01%) |
/explorer/search |
16.82 KB |
214.1 KB | 107.05% (+/- <0.01%) |
/loos/[id]/edit |
45.79 KB |
243.07 KB | 121.53% (🟢 -0.01%) |
/loos/add |
45.27 KB |
242.55 KB | 121.27% (🟢 -0.01%) |
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 10% 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.
📦 Next.js Bundle Analysis for toiletmapThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
197.32 KB (🟡 +323 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!
Six 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 (200 KB ) |
---|---|---|---|
/explorer/loos/[id] |
16.4 KB |
213.72 KB | 106.86% (+/- <0.01%) |
/explorer/search |
16.82 KB |
214.14 KB | 107.07% (+/- <0.01%) |
/loos/[id] |
20.32 KB |
217.64 KB | 108.82% (+/- <0.01%) |
/loos/[id]/edit |
45.76 KB |
243.08 KB | 121.54% (🟢 -0.02%) |
/loos/[id]/remove |
16.04 KB |
213.36 KB | 106.68% (🟢 -0.03%) |
/loos/add |
45.24 KB |
242.56 KB | 121.28% (🟢 -0.03%) |
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 10% 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.
a79616c
to
5abf505
Compare
6f3c7a5
to
adbc0f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
db: the SQL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 💪 Added a few comments on validation and column types (and some bits I am just curious about); nothing blocking though, otherwise looks good to me
schema.prisma
Outdated
id Int @id @default(autoincrement()) | ||
email String? @db.VarChar(255) | ||
feedback_text String | ||
route String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any other properties we should stick a limit on too? 🔎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've limited feedback_text to 5000 chars and route to 255, both seemed reasonable. If someone has more than 5000>chars to write they better write us an email
src/pages/api/feedback/index.page.ts
Outdated
// We'd like to record the full feedback entry in our database for future reference. | ||
await prisma.feedback.create({ | ||
data: { | ||
email: email ?? 'No email provided', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this column nullable instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch, this is nullable by default so I didn't really need to have this text fallback. if email
is undefined/null this field will be null too. will remove the fallback
adbc0f2
to
c38bbfc
Compare
Whoopsy, I've double-reviewed you - definitely not meant to replace yours Max, just had the page open too long before hitting go 😄 |
thanks for the extra comments, all good points - i'll get back soon 🚗 |
…e a record of it in our database add migration for feedback table
…sisted to db successfully
c38bbfc
to
919ee6f
Compare
@Hoolean I've had a look and made some changes based on your feedback :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All feedback addressed
What does this change?