Hotell

Hotell

I skate, surf, wake, snow and open source 🏄‍♂️ @Microsoft MVP, GDE

Member Since 10 years ago

@microsoft , Prague, Czech Republic

Experience Points
362
follower
Lessons Completed
16
follow
Lessons Completed
330
stars
Best Reply Awards
82
repos

507 contributions in the last year

Pinned
⚡ Angular 2 decorators and utils for Angular 1.x
⚡ Typescript library starter
⚡ Static analysis for Angular projects.
⚡ my blog posts published on medium + code samples
⚡ Type safe utils for redux actions, epics, effects, react/preact default props, various type guards and TypeScript utils, React util components
⚡ Dependency injection for React done right. Hierarchical injection on both component and service layer powered by injection-js (Angular DI framework) 🖖
Activity
Nov
26
3 days ago
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

also going forward ( once we migrate to jest 27 ) we should stop using globals as jest provides imports for their API ( one less global in our lives yay )

pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

ideal scenario is to have this in separate package (logic,tests) with proper globals set. but as a temporary workaround/corner case I think so, yes.

Why?

  • tests are not shipped not exported so not used in some other context, thus it is ok to specify local globals inline, if not specified on package level
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

to the moon ! 🙌 thx !

open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

well :D it isssss what it is. thanks!

pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

This happens because packages/react-components/.storybook/tsconfig.json includes all JS files

that's on purpose, to get proper type checking / DX

pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

I was afraid you gonna experience that - its the nature how react types are authored, bottom types and any all over the place :(, ok lets keep it as is.

Additional thought: can you maybe remove explicit generic -> any, as that type has a default generic - the omnipresent former bottom type {} ?

pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

so because the custom logic that is being provided in root /.storybook and in react-components - (main.utils.js), which uses node APIs, node typings are being included to the checking program ( which is how TS works ). At this point there is no functionality that allows us to prevent that.

Only solution is to be explicit and stop doing antipatterns like accesing globals directly.

Instead:

timeoutRef.current = setTimeout(() => setLoading(false), 1000);

Do:

timeoutRef.current = window.setTimeout(() => setLoading(false), 1000);

This will resolve the type issues you're having.


Another thingy:

Now because I introduced tests in react-components/.storybook , we would need to add jest glboals to react-components/.storybook/tsconfig.json. That will pollute all stories, thus allowing anyone to use jest globals in stories. I don't think that's the proper solution ATM, so instead we can do following for that test file:

@filename react-components/.storybook/main.utils.test.js

+/// <reference types="jest" />
const utils = require('./main.utils');

describe(`main utils`, () => {

pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: run migration for @fluentui/make-styles

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Removed .storybook and related package.json#scripts (the same as #20724)
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: run migration for @fluentui/make-styles

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Removed .storybook and related package.json#scripts (the same as #20724)
Hotell
Hotell

I think its ok. how did you get this error ? on CI when running lint task for make-styles?

open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell
  "include": ["./src/**/*.ts", "./src/**/*.tsx"]
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

it is not, please re-run the generator or remove manually all js globs

open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

what do you mean ? that commented code was there before thus removing it ?

pull request

Hotell merge to microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
open pull request

Hotell wants to merge microsoft/fluentui

Hotell
Hotell

chore: migrate @fluentui/react-components

Pull request checklist

  • Addresses an existing issue: related to #20597
  • Include a change request file using $ yarn change

Description of changes

  • Ran generator
  • Restored change in package.json#scripts.storybook
  • Hacked generator to emit proper configs (#20748)
  • Restored changes in packages/react-components/.storybook/preview.js (#20750)
  • Restored changes and fixed packages/react-components/config/api-extractor.local.json
Hotell
Hotell

can we use unknown rather than any ?

Previous