Giter Club home page Giter Club logo

kentcdodds.com's Introduction

Kent C. Dodds' site (rewritten with Remix)

Build Status GPL 3.0 License

Contributing

Read CONTRIBUTING.md

kentcdodds.com's People

Contributors

allangrds avatar amir-ziaei avatar aprillion avatar bartek532 avatar chriscaracach avatar daleseo avatar dane-stevens avatar danywalls avatar imgbot[bot] avatar jpmti2016 avatar junghyeonsu avatar kazu-2020 avatar kentcdodds avatar lada496 avatar lukebrowne avatar makotot avatar michaeldeboey avatar mrkurt avatar nicoder avatar onemen avatar ptrkvsky avatar ramaid avatar rodrigofuentes avatar ryankshaw avatar sasicodes avatar sebastiangon11 avatar smeijer avatar soojae avatar virgilio-redradix avatar woobottle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kentcdodds.com's Issues

Implement /blog/feed.xml

Should be pretty straightforward I think. From Ryan in discord:

  if (new URL(request.url).pathname === "/rss.xml") {
    return new Response(await rss(), {
      headers: {
        "Content-Type": "application/xml",
      },
    });
  }

deps: add `tailwindcss-aspect-ratio`

A plugin that provides a composable API for giving elements a fixed aspect ratio. This will be useful on pages with multiple images, such as blog listings or galleries.

From their readme:


Usage

Combine the aspect-w-{n} and aspect-h-{n} classes to specify the aspect ratio for an element:

<div class="aspect-w-16 aspect-h-9">
  <iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>

Use aspect-none to remove any aspect ratio behavior:

<div class="aspect-w-16 aspect-h-9 lg:aspect-none">
  <!-- ... -->
</div>

https://github.com/tailwindlabs/tailwindcss-aspect-ratio

do something with `codesandbox` button

Some blogs have edit on codesandbox buttons. I think it would be nice if they were positioned inside the code block, instead of on the paragraph below.

What do you think? Maybe in the top right corner?

image

suggestion: move talk details to a detail page

We currently show all details on the /talks page. While it feels like it improves "scannability", it is a LOT of information to digest. I think we're better off moving details to a detail page. Click from /talks to /talks/event-x which then shows things like all tags, the presentations, and the recording.

That gives more space than we have now, and thereby would for example also make it possible to embed the youtube recording and/or slides, while the overview page would feel less crowded.

Stay up to date form submission error state

When submitting empty values to the form in the "Stay up to date" footer section, form validation shows proper validation messages for the missing fields but renders an incorrect message of "Sweet, check your email for confirmation."

Screen.Recording.2021-09-21.at.10.55.42.PM.mov

the close button for mobile menu transforms weirdly

The close button works fine, as long as the page was loaded with the button visible (on narrow screen). But when loading the page in "large screen", then resizing to "narrow screen", and then clicking the button, the transition is malformed.

It feels like a bug in framer-motion, as I can also not force the transform-origin on those svg elements.

I expect that this can be fixed by not rendering the button in a hidden state. Will try later.

pre-commit tries to delete redis cache

The pre-commit hook tries to delete the Redis cache from the running instance, which resulted in an error at my system. The fix was to stop my dev environment and delete the cache before I git commit.

> [email protected] validate
> kcd-scripts validate

[build] /home/smeijer/dev/remix-kentcdodds/node_modules/rimraf/bin.js:46
[build]       throw er
[build]       ^
[build] 
[build] [Error: EACCES: permission denied, unlink './.cache/redis/dump.rdb'] {
[build]   errno: -13,
[build]   code: 'EACCES',
[build]   syscall: 'unlink',
[build]   path: './.cache/redis/dump.rdb'
[build] }
[build] npm run build --silent exited with code 1
--> Sending SIGTERM to other processes..
[typecheck] npm run typecheck --silent exited with code SIGTERM
husky > pre-commit hook failed (add --no-verify to bypass)

I'll see if it keeps occurring, or if it's a one-time thing. Just wanted to dump this somewhere.

Badges

On the profile page, users should get badges for things they've done in the site. Ideas:

  • various levels based on the articles they've read (taking into account the category etc)
  • badges for listening to chats with Kent episodes
  • badge for connecting to discord

More stuff like this would be fun I think.

randomize team order on Signup page

I don't have the numbers, but I remember reading something once that order of options influences our choice. Maybe we should randomize the order of the team buttons on /signup, to maximize the chance of having equality weighted teams.

Add authenticated cache busting API

There should be a specific API that can be hit to bust the redis cache for a specific key and it should only be possible with an "API secret" of sorts. This will be used in a github action when there's a content-only deploy (#37). We'll need to know what content is impacted by a particular change and refresh the cache for that particular key.

Perhaps the API could not only bust the cache, but also refresh it at the same time.

Teams

You know how in Pokemon Go when you start the game you get to choose between yellow, red, and blue teams? For a long time I've wanted to have the same thing on my site. Why? I think it'd be cool to show little indicators on the site that show how many people of a given team are currently on a certain page and how many have been on that page in total. You know... for fun.

Tracking the page views (and time spent on pages) could also help a lot with the suggested articles we plan to put at the bottom of each article as well as feature on the home page.

A simple implementation of this could be done with sessions or local storage. A more legit version of this could involve user accounts which I think is a much bigger idea, but would unlock other cool things I'd like to do...

Search KCD page

I'd like a page where you can search through all my content everywhere. This has been discussed quite a bit: #107

The biggest challenge is creating a way to search through and index all that content. Not sure of the best way to go about it...

Notes

I want to be able to take notes about content and have that available as part of my profile page.

Put static stuff on a CDN

We're doing this already with images. I think we should do it with fonts, the favicon, etc. It will free up the web server to focus on what it does well. I could probably use netlify. I'm pretty happy with them ๐Ÿ‘

Layout Shift

On all top navigation pages but Discord and About the layout shifts for me after a few seconds. Probably this is not the preferred behavior.

06-08-_2021_17-52-10

idea: use team color for focus styles

Random thought:

If we can set the team color as a css var like, we could use that in tailwind.config for team.current, and then do something like:

<input className="focus:ring-team-current" />

That way, the focus color of inputs, buttons, and links, could be based on the team color.

Sign up flow continuation

I made it so you can leave onboarding and come back later. However, that means people might forget which email address they used. So I just put it in the greeting on the sign up page:

image

Maybe we should go back to the original design of having an input field (but make it read only). I'm open to suggestions.

Another thing this means is that people may want to "log out" of the account they don't yet have set up (if they want to use a different email) so I think that means we'll need the logout button again. But I don't want to call it "logout." I think I'd want it to be called "Cancel setup" or something. Thoughts?

Optimize images

The images file doesn't do anything to use cloudinary's amazing optimization stuff. I think it'd be cool to be able to call a function for a particular image to specify the desired size/etc and have that function generate the cloudinary URL for that. Cloudinary has a module for this we might consider using.

Fallback to local content

If the github API request fails for some reason, we should fallback to the local MDX files. We should even cache that value (otherwise it'll still be really slow to compile on demand).

Favorites

I want to be able to add content as a "favorite" and have a favorites list on my profile page.

Link preview for sharing on Discord/Twitter

When you get around to adding link preview image for sharing blog posts on social media, presumably using https://ogp.me/ like <meta property="og:image" content="..." /> (or using some Remix utility that would automate it), please consider showing a more compact preview that would take less vertical space than the current preview:
Screenshot 2021-04-14 at 13 55 19

IMHO something like these GitHub links would look best:
Screenshot 2021-04-14 at 14 04 00

Not sure how the black magic works exactly, some experimentation with https://ogp.me/#no_vertical might be needed. FTR, GitHub is using following for that particular page:

<meta name="twitter:image:src" content="https://avatars.githubusercontent.com/u/1500684?s=400&amp;v=4" />
<meta name="twitter:site" content="@github" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="kentcdodds/esbuild-node-modules" />
<meta name="twitter:description" content="Contribute to kentcdodds/esbuild-node-modules development by creating an account on GitHub." />

<meta property="og:image" content="https://avatars.githubusercontent.com/u/1500684?s=400&amp;v=4" />
<meta property="og:site_name" content="GitHub" />
<meta property="og:type" content="object" />
<meta property="og:title" content="kentcdodds/esbuild-node-modules" />
<meta property="og:url" content="https://github.com/kentcdodds/esbuild-node-modules" />
<meta property="og:description" content="Contribute to kentcdodds/esbuild-node-modules development by creating an account on GitHub." />

force aspect ratio of blog header images?

Should we force the aspect ratio, or at least max-height of blog header images, so that the image of articles like http://localhost:3000/blog/super-simple-start-to-remix don't span more than my viewport height?

Discuss

#19 (comment)

Gotta run, but wanted to make sure we don't forget to address this:

Regarding the candy dispenser, do a lot of posts have embedded jsx/html? We could adjust the prose classes to either do something with embedded html, or attempt to not target it entirely. But I feel like content like that should be positioned in an iframe, with its own styling.

Otherwise, we'll always have the chance of missing some (edge) cases.

The transparent png at /blog/unit-vs-integration-vs-e2e-tests can easily be fixed by adding a light background color to .prose img to simulate the effect of the current site (transparent on white), but not sure if that has your preference, because then you'll lose the benefit of transparent images.

Thoughts?

Footer at 1024px

The footer columns look sub-optimal around 1024px window width (Firefox 92, MacOS):

Screenshot 2021-09-22 at 15 54 03

Especially the padding for the email field looks odd - it still seems to be functional, so just a cosmetic issue.

Release checklist

Do these things before changing this site from kent.dev to kentcdodds.com:

  • Update the robots.txt to allow indexing.
  • Remove the robots: 'noindex', from meta in root.tsx.
  • Remove the 'X-Robots-Tag': 'none', header from entry.server.tsx
  • Check that the meta on every page is correct.
  • Update the domain we deploy to
  • Setup custom domain with fathom: https://usefathom.com/docs/settings/custom-domains
  • Pray ๐Ÿ™

Default to dark mode theme

I think we should ignore the color scheme preference, and just default to dark mode. This site looks best in dark mode, and most people don't take the trouble of changing browser settings (which defaults to light mode).

If they really prefer light mode, it's just one click away, and persisted in a cookie any ways.

TLDR; Default to dark mode, regardless of browser settings.

Changing teams

I'm sure there will be people who want to be able to change their team. I plan to link them to this issue when they ask.

... am I talking about you? ๐Ÿ˜†

Here's the thing. The teams thing is mostly a just for fun thing. There's no benefit to being on one team or the other. If I allow folks to change their team, they'll take it too seriously. They'll prefer to be on a "winning" team or whatever. I even considered randomly assigning teams for this reason, but I thought it'd be fun to let people choose.

However, I realize that some folks might really want to change their team and I can make it happen. It just takes time out of my day. So here's the compromise: You do something good in the world, tweet about what you've done with the hashtag #KCDTeamsMakeTheWorldBetter, send me a link to that with your account email and the team color you want to be and I'll make the change for you.

Not sure what to do? Donate to a good cause. Pick up some garbage in your neighborhood. Visit an elderly person or someone in the hospital. Whatever. Just make the world better and I'll call it even.

add permlink to frontmatter?

Copy buttons need a full URL to be copied to the clipboard.

I can construct something using new URL(frontmatter.slug, location.origin).toString(), but this will not work server-side.

My proposal; add a BASE_URL env var, and use that to construct perma-links that will be part of the frontmatter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.