probablyup
Repos
110
Followers
331
Following
57

🏭 The most lightweight, customizable React markdown component.

1451
130

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

37499
2236

Events

styled-components v6 beta feedback

TS error trying to destructure theme from props, see X and Y in sandbox

It's actually the use of css ttl that it's complaining about, if you reduce it to a simple interpolation it works:

const X = styled.h1`
  color: ${({ theme }) => theme.colors.red};
`

I'll take a look at the Interpolation type and see if something needs to be done...

Styled component props seems to lack as, hover over ZProps in same sandbox

Interesting, if you compose Z as jsx it takes and resolves the as just fine. Will look into it.

Created at 16 hours ago
[Request] RSS Feed for Releases page

I would like to take this issue for hacktoberfest

It’s yours and thank you!

Created at 1 day ago

chore(release): v6.0.0-beta.3

Created at 2 days ago
styled-components v6 beta feedback

Just published v6.0.0-beta.3 with a ton of type fixes, thanks @agriffis and @alexandernanberg for contributing! https://github.com/styled-components/styled-components/releases/tag/v6.0.0-beta.3

Created at 2 days ago
probablyup create tag v6.0.0-beta.3
Created at 2 days ago

refactor(types): fix fltten type

Created at 2 days ago

refactor(types): fix attrs hole-punching

There is an edge case documented in attrs.test.tsx where a base component may have a type that marks a particular prop as required.

Using attrs you can provide a value for this required field, in that event we need to mark the field value in the base type as optional since its known that a value was provided.

Created at 2 days ago
feat: move style injection from render to useInsetionEffect

I'll have to look at this one later. I switched us to use the new effect type for global styles but I'm not sure about doing it for component styles since they need to be injected as fast as possible on first render

Created at 2 days ago

chore: correctly link local styled-components to sandbox (#3822)

  • chore: correctly link local styled-components to sandbox

  • chore: fix sandbox tsconfig

  • chore: remove unused yarn.lock

  • chore: remove unused React import

Created at 2 days ago
chore: correctly link local styled-components to sandbox
  • Link local styled-components to sandbox, to easily test changes
  • Fix sandbox tsconfig
  • Remove unused yarn.lock
  • Remove unused React import
Created at 2 days ago

refactor(types): fix as prop inference

breaking refactor: remove $as, $forwardedAs; iterate on types

Created at 3 days ago

refactor(types): updated statics, fix refs

Created at 3 days ago

collected fixes for v6 typescript (#3809)

  • refactor: remove unnecessary type cast

  • fix: extends object instead of extends {}

TypeScript has three object types:

  • Object is any non-null non-undefined value including primitives
  • {} is is like Object but even less strict
  • object is any non-primitive type, in other words what we think of as an object in JavaScript

Ref https://stackoverflow.com/a/49465172/347386

  • refactor: tighter implementation of propsForElement.style

  • fix: kill BaseExtensibleObject

There are two things going on here:

  1. Tease apart ExtensibleObject from BaseExtensibleObject. (The former is renamed in the following commit.)

  2. Kill BaseExtensibleObject in favor of explicit Dict where appropriate.

This allows styled components to properly check for required props, since BaseExtensibleObject was preventing any actual checking.

Additionally this seems to fix the nested css problem mentioned at https://github.com/styled-components/styled-components/issues/3800#issuecomment-1242761767

  • refactor: rename ExtensibleObject to ExecutionProps

ExtensibleObject is essentially Partial so let's just rename it.

  • fix: typing lost through .attrs

This fixes the problem reported here: https://github.com/styled-components/styled-components/issues/3800#issuecomment-1242760145

and additionally allows the attrs call to be explicitly typed:

// infers {device: string}
const X = styled.div.attrs({device: 'mobile'})``

// explicit constraint
const Y = styled.div.attrs<{device: 'desktop' | 'mobile'}>(props => ({
  device: 'mobile',
  ...props,
}))``
  • fix: shouldForwardProp always receives elementToBeCreated

There's no need for shouldForwardProp implementations to handle an undefined elementToBeCreated.

Created at 3 days ago
collected fixes for v6 typescript

This fixes a bunch, but not all, of the problems reported in #3800

The problems fixed:

The changes:

  • kill BaseExtensibleObject (and use Dict<any> explicitly in places that need that kind of thing, where type Dict<T> = {[k: string]: T})
  • rename ExtensibleObject to ExecutionProps since it's essentially a partial ExecutionContext
  • change lots of <Props = unknown> to <Props extends object> which allows TS to check and infer a bit more
  • allow the attrs call to infer or optionally be explicitly typed:
// infers {device: string}
const X = styled.div.attrs({device: 'mobile'})``

// explicit constraint
const Y = styled.div.attrs<{device: 'desktop' | 'mobile'}>(props => ({
  device: 'mobile',
  ...props,
}))``
  • improve typing on shouldForwardProp since it always receives elementToBeCreated

I'm confident these changes don't solve all the problems, but I think it's a good stepping stone. With this merged, I think we should be able to muddle through the remaining issues.

Created at 3 days ago
collected fixes for v6 typescript

Going to merge and continue iterating against main

Created at 3 days ago
collected fixes for v6 typescript

Hard to say, but since the previous verson didn't actually check the props passed to styled components, that could account for some of it 😜

Hahahah touché. I’ll look at it more later, started reviewing this morning.

Created at 4 days ago
collected fixes for v6 typescript

There's some good stuff in here, but the types are noticeably slower to evaluate in this branch. Not quite sure why... perhaps because of all the behind the scenes object merging?

Created at 4 days ago

Escaped an unescaped tilde. (#450)

Nothing much to explain here,

The unescaped tilde in line 547 was making the codeblock that started at 543 to end at 547 instead of 549.

Created at 6 days ago
pull request closed
Escaped an unescaped tilde.

Nothing much to explain here,

The unescaped tilde in line 547 was making the codeblock that started at 543 to end at 547 instead of 549.

Created at 6 days ago

Bump ejs from 3.1.6 to 3.1.8 (#452)

Bumps ejs from 3.1.6 to 3.1.8.


updated-dependencies:

  • dependency-name: ejs dependency-type: indirect ...

Signed-off-by: dependabot[bot] support@github.com

Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Created at 6 days ago
probablyup delete branch dependabot/npm_and_yarn/ejs-3.1.8
Created at 6 days ago
pull request closed
Bump ejs from 3.1.6 to 3.1.8

Bumps ejs from 3.1.6 to 3.1.8.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Created at 6 days ago