Closed berekuk closed 2 years ago
Name | Link |
---|---|
Latest commit | 6b0a9a4c417124057d2eeeb3bf0f42096511cfd3 |
Latest deploy log | https://app.netlify.com/sites/metaforecast/deploys/6255d14798abb900081265e3 |
Deploy Preview | https://deploy-preview-53--metaforecast.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
This looks good. Could you also create a dashboardEmbed with the same schema (dashboardEmbed/view/[id]), to replace secretDashboard, but without deleting the secretDashboard page yet?
Could you also create a dashboardEmbed with the same schema (dashboardEmbed/view/[id]), to replace secretDashboard, but without deleting the secretDashboard page yet?
Maybe dashboard/embed/[id]
for namespacing then? Or /dashboard/view/[id]/embed
.
I could just add a redirect to it and keep /secretDashboard
forever as legacy.
Btw, where is /secretDashboard
used currently? I see by Netlify analytics that it gets a lot of traffic (from globalguessing.com, probably?), but I couldn't find any pages where it's embedded. Reason I'm asking: it dumps a raw json into html, and I wonder if all pages that embed it are currently messed up.
Maybe dashboard/embed/[id] for namespacing then? Or /dashboard/view/[id]/embed.
dashboard/embed/[id] sounds a bit better.
I could just add a redirect to it and keep /secretDashboard forever as legacy.
Sounds good, though maybe not forever.
Btw, where is /secretDashboard used currently?
Here: https://globalguessing.com/russia-ukraine-forecasts/, that I know of
Reason I'm asking: it dumps a raw json into html, and I wonder if all pages that embed it are currently messed up.
Oh, I mixed it up with /secretEmbed. /secretDashboard is fine.
/secretEmbed is used by the twitter bot.
Is this PR ready to be merged?
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
π Inspect: https://vercel.com/quantified-uncertainty/metaforecast/5ZTfKLAW8aiqZH82jxMy1jssYKCC
β
Preview: https://metaforecast-git-forecast-html-css-quantified-uncertainty.vercel.app
Is this PR ready to be merged?
Yes! βοΈ
Also, I added /dashboards/embed/[id]
redirect in the final commit.
I'm getting some errors in Vercel related to this commit @berekuk
Also, I added /dashboards/embed/[id] redirect in the final commit.
Nice
I'm getting some errors in Vercel related to this commit
That's #15 again (due to me pushing longer versions of infer/gjopen cookies there). Fixed.
Ok, I got a bit carried away here (instead of working on graphql, going to start on that soon), but these are the cleanups I wanted to do eventually.
What's included:
docs/coding-style.md
explaining what I consider to be best practice.1) Cleanups:
React.FC<Props>
DisplayForecast
component, split footer in a separate file (and should've split more stuff), removed some unused code, etc.let
s withconst
s wherever I've seen them :) (two more letters, but it's better for typing and clearer in intent)2) Simplified HTML/CSS for
DisplayForecast
,/tools
and/dashboards
:Card
,Button
andLastUpdated
showTimeStamp
and screen size... but I think I checked most of it, e.g. how question cards look on/secretEmbed
)mt-N mb-M
I tried to replace it withspace-y-N
in the parent component, and some sub-components shifted by a few pixels due to this3) Dashboards:
/dashboards/view/[id]
, with redirects from the old/dashboards?dashboardId=[id]
(using middleware, seesrc/pages/_middleware.ts
)initialVariable
and useEffects, I think trying to handle it the old way is too much of an anti-pattern, tbh)