microsoft/fluentui 9008
We've moved! UI Fabric is now Fluent UI - A set of React components for building Microsoft web experiences.
WICG/open-ui 790
Maintain an open standard for UI and promote its adherence and adoption.
An ecosystem for building highly customizable enterprise class user interfaces.
joschect/office-ui-fabric-react 0
React components for building experiences for Office and Office 365.
PR opened microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr created time in 17 hours
create barnchjoschect/office-ui-fabric-react
branch : add-restorer-tocontextualmenu
created branch time in 19 hours
push eventjoschect/office-ui-fabric-react
commit sha 7bea3a43f5f01a3aef8a36813b8d88484aa021bc
Enable "rules of hooks" lint rules in react-hooks and utilities; hook fixes (#14099)
commit sha a8adc0333c14d3470e8c48567d30f0421c0977d4
[Callout] Copy OUFR code to react-next (#14146) * Copy Callout code from OUFR to react-next * Change files * Fix lint issue
commit sha 4dac03be0750dc8f25b336c5b506ee923eaf5ee5
PeoplePicker keyboard focus state: Add styles to PeoplePicker to fix keyboard focus state ratio (#14124) * Add :after styles to fix ratio of suggested items in PeoplePicker on keyboard focus * Change files * update snapshots and remove unused import * remove z-index and change to semanticColors.focusBorder * update snapshots * update snapshots * add background and border styling to suggestion items and update snapshots * revert to master version * revert file back to master version
commit sha a70f15f2724d572e515bfe7f97cda751f8bc69a7
Maybe: Improve chainability, type checking and move to being class based. (#14101) #### Pull request checklist - [ ] Addresses an existing issue: Fixes #0000 - [ ] Include a change request file using `$ yarn change` #### Description of changes (give an overview) #### Focus areas to test (optional)
commit sha 1b833965d061b57d71cf621a006ed7ef13ccffd8
Move Pivot to @fluentui/react-tabs package (#14125) #### Pull request checklist - [x] Addresses an existing issue: Fixes #14034 - [x] Include a change request file using `$ yarn change` #### Description of changes Move Pivot to @fluentui/react-tabs package
commit sha b8d93b166cd836b9534eaa23d4f57f6bb12ffb2f
applying package updates
commit sha 581a489a857033dfa862e0ba782aba2006f607ac
Feat/date-time-utilities Consolidate package based on latest usage (#14058) * Consolidating date-time-utilities and Datepicker..Props * Roll-backed to flattened props * Updating tests in date-time-utilities * Updating props * Capturing the intention of the isContiguous method * Make tests succeed * Change files * Better describing change * Renaming parse method * Move const to separate file * Updating reference * Updating types in date-time-utilities * Package downgrade * Updated API * Update PickersOverview.md * Trying to remove whitespace * Change files * Removing whitespace issue Co-authored-by: Karel Rymes <[email protected]>
commit sha 7d239d4c7709837d6a9a743d0cd9ef83305b3139
update codesandbox templates' tsconfig.json (#14150) #### Pull request checklist - [ ] Addresses an existing issue: Fixes #0000 - [ ] Include a change request file using `$ yarn change` #### Description of changes updates tsconfig.json file to remove comments and look more similar to other tsconfig.json files #### Focus areas to test (optional)
commit sha f8def98981f2eba795fb88afd3887fedc0b56a9c
Charting: Fix Line chart render with empty array of data + a event annotation, the chart throws a strange formatting exception (#14161) * Charting: Fix Line chart render with empty array of data + a event annotation, the chart throws a strange formatting exception. * Change files Co-authored-by: Rajesh Goriga <[email protected]>
commit sha 767b6094a42a4b5171844ccdc95741029e6e0ae8
UnifiedPicker accessibility fixes (#14090) * Error: ensure every form element has a label The Autofill didn't. The prop already existed though, so this was a bug with the sample. I have added it. * Removing the list role from the wrapper div * Fix violation: ensures elements with an aria role that require child roles contain them Dropdown was using a local var instead of the prop to set aria vars, * Setting the activedescendent properly * Do an index check * updating snapshots * Change files * address PR comments * Add SelectedItemsList fixes * Update change file * Don't have an empty div if there are no list items
commit sha 44b99ab5e98f0c80e10b0d141a54903a328be450
fix aria labels in WeeklyDayPicker (#14073) * fix next and previous month/week aria labels in weekly day picker * Change files * updating change file and the api file * fixing lint issue with the new methods
commit sha a9f932261132ead0df90ac81614068e9b0951824
T-dama/Added More Transforms (#14152) * WIP add transform * WIP robustness checks * simplify transforms * merge fixes * add general transforms that work with spread * clean up propHelper * WIP robustness checks * fix conflicts with new maybe * Change files * clean return Co-authored-by: Trip Master <[email protected]>
commit sha 2534fd78ec65b88a5049c7d2d9e54d1103159852
Enable "rules of hooks" lint rules in date-time and lists (#14098)
commit sha 5e06d57166032a570b08f077ed7ab8d4cf8d95f6
Enable "rules of hooks" lint rules in experiments (#14100)
commit sha 68f77ba470b728bc947d37c4f2d3754d82f5bb3a
Grouped vertical bar chart method calling in did mount. (#14137) * Groped vertical bar chart calling in did mount * Change files * change log files Co-authored-by: Jameela Kowsar Shaik (Zen3 Infosolutions America Inc) <[email protected]>
commit sha 940524c755d5cf60ca3f80b705e30fca61b2d5ba
Create @fluentui/common-styles package, for styling files shared between components (#14155) * Add common-styles package; move styles from react-next and react-tabs
commit sha 1f19c0a771a864d7225cc7b7e8951388a7671039
applying package updates
commit sha 9f24389e2d1ec68a2555df860518273330e0e62a
Codemods/renamePropInSpread abstract out logic and improve documentation (#14172) * WIP add transform * WIP robustness checks * add general transforms that work with spread * clean up propHelper * WIP decomp add var statement * improve abstraction / documentation * Change files Co-authored-by: Trip Master <[email protected]>
commit sha c0ba783ab53821e4a70f61f823e87ca240a9665a
Dropdown: fix high contrast styles in disabled state (#14176) * Add high contrast adjust selector to dropdown styles * Change files * Change files * update choicegroup snapshot
commit sha 4f6d22e0094842f600d122cc6eba05075919ed5b
Add mark to Calendar component days (#14074) * adding ability to mark calendar days with a callback function * updating types and public api file * Change files * removing important * renaming functional components to satisfy linter * changing callback function for marking days from a per-day callback (requiring 35 - 42 calls per render) to a per-month callback (requiring 1 call per render) * moving isMarked to be on IDay interface, allowing passing list of days or callback function for days * Change files * adjusting classNames to remove hack * undoing *.md changes * undoing .doc changes also * addressing comments * addressing comment
push time in a day
pull request commentmicrosoft/fluentui
Screen Reader is not announcing the location list items twice.
@Ravishankar9-dev the comment for this says commandbar but it looks like this is the combobox, did you intend to change a different component?
comment created time in 7 days
pull request commentmicrosoft/fluentui
closing and reopening to rebuild
comment created time in 7 days
PR closed microsoft/fluentui
Pull request checklist
- [x] Addresses an existing issue: Fixes #13590
- [x] Include a change request file using
$ yarn change
Description of changes
This adds a noop transform that forces hardware acceleration.
Before

After

Focus areas to test
pr closed time in 7 days
push eventjoschect/office-ui-fabric-react
commit sha ca0ec918ab6d44a155cde5a77f5dec3e2d518fe9
remove mappable to reduce confusion
push time in 7 days
push eventjdhuntington/react-caught
commit sha 5e1b4d45c5fb89caf506fe75b79276a930f103bf
add focus thing
commit sha e972d1e612e5164446d68ed899c10899913e6a05
Merge branch 'master' of https://github.com/jdhuntington/react-caught
push time in 7 days
push eventjdhuntington/react-caught
commit sha 040e80c9f59541274a2bebffe6e896415a03f390
add react monad
push time in 8 days
push eventjdhuntington/react-caught
commit sha bb6aaee63147f911a8981337f2113b7e5458b342
add in react monad
push time in 8 days
push eventjdhuntington/react-caught
commit sha 6f82e6fd7d4396cfaf333c752b6ef2eca03ab7e4
Add checkbox example, both with traditional hooks and state monad
push time in 8 days
push eventjdhuntington/react-caught
commit sha 8bf177bb2c294031561d8fc1c63ce1d2438c3239
add another example
push time in 8 days
push eventjdhuntington/react-caught
commit sha 6f0a14c26cbf079e2555bf0101c611f195dfa564
add in state monad
commit sha 0eaad025bea8b76c769aa4d188ac28b3675edd40
Merge branch 'master' of https://github.com/jdhuntington/react-caught
commit sha eb7182f06375aa4f82512bcd61b74504c8771a8a
format
push time in 9 days
PR closed microsoft/fluentui
WIP branch for debugging purposes.
Currently, imports of adjacent/locals files do not appear to be recognized by ts-morph. We're fixing it :)
pr closed time in 9 days
push eventjoschect/office-ui-fabric-react
commit sha a89d86e157fe90e14d092d76ad6b99f11c0c86e2
Beef up tests and address comments
push time in 13 days
Pull request review commentmicrosoft/fluentui
Result: Add either to help with creation of codemods
+import { Chainable, Flattened } from './chainable';++export interface Ok<R, E> extends ResultInternal<R, E> {+ ok: true;+ value: R;+}++export interface Err<R, E> extends ResultInternal<R, E> {+ ok: false;+ value: E;+}++class ResultInternal<R, E> implements Chainable<R> {+ public ok: boolean;+ public value: R | E;++ public constructor(options: { ok: boolean; value: R | E }) {+ this.ok = options.ok;+ this.value = options.value;+ }++ public map<T>(this: Result<R, E>, fn: (v: R) => T): Result<T, E> {+ if (this.ok) {+ return Ok(fn(this.value));+ }++ return Err(this.value);+ }++ public chain<T>(this: Result<R, E>, fn: (v: R) => Result<T, E>): Result<T, E> {+ if (this.ok) {+ return fn(this.value);+ }+ return Err(this.value);+ }++ /**+ * Works just like chain, but is only called if this Result is an error.+ * This returns a new Result with type Result<R, NewType>+ */+ public orChain<T>(this: Result<R, E>, fn: (v: E) => Result<R, T>): Result<R, T> {+ if (!this.ok) {+ return fn(this.value);+ }+ return Ok(this.value);+ }++ public flatten(): Flattened<R, Result<R, E>> {+ if (this.value && this.value instanceof ResultInternal) {+ return this.value as Flattened<R, Result<R, E>>;+ }+ return (this as unknown) as Flattened<R, Result<R, E>>;+ }++ /**+ * This allows users to opperate on a presumed result without needing to know whether or not+ * the result was successful or not.+ * At each call if it is a result type of ok, it will call the supplied function, otherwise it+ * will return the current value with a new Err.+ *+ * @param fnOk Function that takes in an ok value of type R and returns either F or Result<F,E>+ */+ public then<F>(this: Result<R, E>, fnOk: (v: R) => F | Result<F, E>): Result<F, E> {+ if (this.ok) {+ return Ok(fnOk(this.value)).flatten() as Result<F, E>;+ }++ return Err(this.value);+ }++ /**+ * Works just like then, but is only called if this Result is an error.+ * This returns a new Result with type Result<R, NewType>+ */+ public orThen<F>(this: Result<R, E>, fnErr: (v: E) => F | Result<R, F>): Result<R, F> {+ if (!this.ok) {+ return Ok(fnErr(this.value)).flatten() as Result<R, F>;
Yes it should be. Or at least I need to change the typings.
comment created time in 13 days
Pull request review commentmicrosoft/fluentui
Result: Add either to help with creation of codemods
+import { Chainable, Flattened } from './chainable';++export interface Ok<R, E> extends ResultInternal<R, E> {+ ok: true;+ value: R;+}++export interface Err<R, E> extends ResultInternal<R, E> {+ ok: false;+ value: E;+}++class ResultInternal<R, E> implements Chainable<R> {+ public ok: boolean;+ public value: R | E;++ public constructor(options: { ok: boolean; value: R | E }) {+ this.ok = options.ok;+ this.value = options.value;+ }++ public map<T>(this: Result<R, E>, fn: (v: R) => T): Result<T, E> {
Map is sufficient, but I think that chain is a nice to have. Take the instance where I have a function like processString(str): Result<string, E> and I have some result like fetchedString: Result<string, E> that was potentially obtained from a rest call. I want to process the string and I cannot do fetchedString.map(processString) without calling flatten afterwards. Having something like chain to just handle that is nice. There are also cases where you might want it to be nested, in which case having map is still useful.
comment created time in 13 days
Pull request review commentmicrosoft/fluentui
Result: Add either to help with creation of codemods
+import { Chainable, Flattened } from './chainable';++export interface Ok<R, E> extends ResultInternal<R, E> {+ ok: true;+ value: R;+}++export interface Err<R, E> extends ResultInternal<R, E> {
Actually Error is not a constructor, it's used the exact same way that this error would be, Error("Error is thrown")
comment created time in 13 days
Pull request review commentmicrosoft/fluentui
Result: Add either to help with creation of codemods
+import { Chainable, Flattened } from './chainable';++export interface Ok<R, E> extends ResultInternal<R, E> {+ ok: true;+ value: R;+}++export interface Err<R, E> extends ResultInternal<R, E> {
I chose err because the Error constructor already exists and I don't want to overload it to much.
comment created time in 13 days
push eventjoschect/office-ui-fabric-react
commit sha d1085786300dedd52c715906d24c9577a77b5033
update change file
push time in 13 days
push eventjoschect/office-ui-fabric-react
commit sha 8093c3080fc74f0195a6e176de366c7ec36a24f8
change test name
push time in 13 days
push eventjoschect/office-ui-fabric-react
commit sha 581367ce49fb1eb831e8e22a10eb517638e212e5
rename to result and add some comments
push time in 13 days
push eventmicrosoft/fluentui
commit sha 9f24389e2d1ec68a2555df860518273330e0e62a
Codemods/renamePropInSpread abstract out logic and improve documentation (#14172) * WIP add transform * WIP robustness checks * add general transforms that work with spread * clean up propHelper * WIP decomp add var statement * improve abstraction / documentation * Change files Co-authored-by: Trip Master <[email protected]>
push time in 13 days
PR merged microsoft/fluentui
Description of changes
Abstracted some ts-morph out of the renamePropInSpread() function. Improved documentation for developer who want to write transforms
pr closed time in 13 days
Pull request review commentmicrosoft/fluentui
Either: Add either to help with creation of codemods
+import { Chainable, Flattened } from './chainable';++export interface Right<R, L> extends EitherInternal<R, L> {+ left: false;+ right: true;+ value: R;+}+export interface Left<R, L> extends EitherInternal<R, L> {+ left: true;+ right: false;+ value: L;+}++class EitherInternal<R, L> implements Chainable<R> {+ public left: boolean;+ public right: boolean;+ public value: R | L;++ public constructor(options: { left: boolean; right: boolean; value: R | L }) {+ this.left = options.left;+ this.right = options.right;+ this.value = options.value;+ }++ public fmap<T>(this: Either<R, L>, fn: (v: R) => T): Either<T, L> {+ if (this.right) {+ return Right(fn(this.value));+ }++ return Left(this.value);+ }++ public chain<T>(this: Either<R, L>, fn: (v: R) => Either<T, L>): Either<T, L> {+ if (this.right) {+ return fn(this.value);+ }+ return Left(this.value);+ }++ public flatten(): Flattened<R, Either<R, L>> {+ if (this.value && this.value instanceof EitherInternal) {+ return this.value as Flattened<R, Either<R, L>>;+ }+ return (this as unknown) as Flattened<R, Either<R, L>>;+ }++ public then<F>(this: Either<R, L>, fnR: (v: R) => F | Either<F, L>, fnL?: (v: L) => F | Either<F, L>): Either<F, L> {
This can't support 2 single functions due to the expect input of those lambdas. Having a single function means that the type required to assess is R | L which then means that you must know something about the type of the Either which negates a lot of its usefulness. I could potentially rename this whole thing as result. Another way to look at the typings could be Return Value | Error Value and you might want to preform several operations on the return value which could return a new Error Value at any time. But the error cannot then return a valid return value.
comment created time in 14 days
push eventmicrosoft/fluentui
commit sha a9f932261132ead0df90ac81614068e9b0951824
T-dama/Added More Transforms (#14152) * WIP add transform * WIP robustness checks * simplify transforms * merge fixes * add general transforms that work with spread * clean up propHelper * WIP robustness checks * fix conflicts with new maybe * Change files * clean return Co-authored-by: Trip Master <[email protected]>
push time in 14 days
PR merged microsoft/fluentui
Description of changes
Added number and string transforms Added documentation on how to write a transform Abstracted out some ts-morph logic from the transform process into helpers so that devs don't have to know too much about AST's. Reordered a few tests.
pr closed time in 14 days
Pull request review commentmicrosoft/fluentui
export function enumTransform(map: ValueMap<string>): PropTransform { if (!map) { return; }- switch (element.getKind()) {- case SyntaxKind.JsxExpression:- {- const toChange = Maybe(element.getFirstChildByKind(SyntaxKind.PropertyAccessExpression));- if (toChange.just) {- const oldText = toChange.value.getText();- toChange.value.replaceWithText(map[oldText]);- }- }- break;- case SyntaxKind.JsxOpeningElement:- case SyntaxKind.JsxSelfClosingElement: {- renamePropInSpread(element as JsxOpeningElement | JsxSelfClosingElement, toRename, replacementName, map);- break;+ if (elementNotInSpread(element)) {+ const toChange = getValueToChange(element as JsxExpression);+ if (toChange) {+ const oldText = toChange.getText();+ toChange.replaceWithText(map[oldText]); }+ } else {+ renamePropInSpread(element as JsxOpeningElement | JsxSelfClosingElement, toRename, replacementName, map); } }; }++/* Returns whether the supplied ELEMENT contains a prop within a+ spread attribute. This is done by detecting whether the supplied+ ELEMENT is a JsxExpression, meaning that we have close access to+ the prop, or if it's a Jsx opening element, meaning we can't access it. */+function elementNotInSpread(element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement): boolean {+ return element.getKind() === SyntaxKind.JsxExpression;+}++/* Returns the piece of the AST that represents the value that the+ developer can overwrite. */+function getValueToChange(element: JsxExpression) {+ const toChange = Maybe(element.getChildAtIndex(1)); // Child between {} operators.
Since tochange isn't ever operated on it's okay to just do return element.getChildAtIndex(1)
comment created time in 15 days
PR opened microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
Either makes it easy to handle things like failure states since you can return the error and handle it later after preforming several computations.
Focus areas to test
(optional)
pr created time in 15 days
push eventjoschect/office-ui-fabric-react
commit sha 075faecc6328f3ed9fbaa1c388ec9c8ded03ca09
Change files
push time in 15 days
PR closed microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr closed time in 15 days
push eventjoschect/office-ui-fabric-react
commit sha fda47de92fc2f2dcb825c07e6452aafc87dc9d52
[UnifiedPicker] Fixing the paste logic and updating the example (#14121) * fixing paste logic
commit sha 4b8d8bc6315978b021f098378231248eae39b156
fix(UI Builder): load babel before loading the UI Builder (#14120)
commit sha 63b41e907049f38dd65f5cbb027b1be4ade7615c
Start enabling "rules of hooks" lint rules (#14097)
commit sha f584014cfdb4375cc8ee125fe1c8f8daaff430c4
applying package updates
commit sha 1e1838959a48481860b0d3acfefd71546b7036ec
feat(Datepicker): Add Calendar navigation (#14061) #### Pull request checklist - [ ] Addresses an existing issue: Fixes #0000 - [ ] Include a change request file using `$ yarn change` #### Description of changes Adding arrow buttons for navigation in `DatepickerCalendar`. Adding child components and exposing them in Datepicker props for consumer overrides **UI before**  **UI after** 
commit sha 2ce05ffc6f2988adfceea3f99c8fee101326f4e6
feat: add imperative handle for Popper, remove warnings (#14131) * feat: add imperative handle for Popper, remove warnings * fix issue, fix UT * fix UTs * add propTypes * update async example
commit sha 9c9ef94404e37645e271d920eb3c715b6adc0f3e
feat: add @fluentui/react-image (#14083) * feat: add @fluentui/react-image * Change files * add API file * fix deps * Update packages/react-image/src/components/Image/useImage.ts Co-authored-by: Makoto Morimoto <[email protected]> * Update packages/react-image/src/components/Image/ImageBase.tsx Co-authored-by: Makoto Morimoto <[email protected]> * Update packages/react-image/tsconfig.json Co-authored-by: Elizabeth Craig <[email protected]> * Update packages/react-image/package.json * update types * fix versions Co-authored-by: Makoto Morimoto <[email protected]> Co-authored-by: Elizabeth Craig <[email protected]>
commit sha fe2f59ab230033eeaca58bc7c16d5096d922faf7
Best Practices Docs Update Branch (#13887) Major overhaul of component documentation markdown content
commit sha 41bc48a4656ff7ebff0e4643b26a4fa17215f7ce
Rename release.md to RELEASE_NOTES.md
commit sha 50b712e1326f93f4d22f81ebdf83fcce48b7f070
Update RELEASE_NOTES.md
commit sha 7236cfa7f9784c7a8a42d87ca51db9dd16484d06
Update RELEASE_NOTES.md
commit sha f7feb25732b3c959b6da4abd5a6c1dcb020c16a3
Add simple transform functions to change prop values (#14140) * WIP add transform * add general transforms that work with spread * Change files * clean up propHelper * fix unused import Co-authored-by: Trip Master <[email protected]>
commit sha 669bdae4bdb98d39013d705afb2625c5383c68c3
Maybe to class
push time in 15 days
push eventjoschect/office-ui-fabric-react
commit sha fda47de92fc2f2dcb825c07e6452aafc87dc9d52
[UnifiedPicker] Fixing the paste logic and updating the example (#14121) * fixing paste logic
commit sha 4b8d8bc6315978b021f098378231248eae39b156
fix(UI Builder): load babel before loading the UI Builder (#14120)
commit sha 63b41e907049f38dd65f5cbb027b1be4ade7615c
Start enabling "rules of hooks" lint rules (#14097)
commit sha f584014cfdb4375cc8ee125fe1c8f8daaff430c4
applying package updates
commit sha 1e1838959a48481860b0d3acfefd71546b7036ec
feat(Datepicker): Add Calendar navigation (#14061) #### Pull request checklist - [ ] Addresses an existing issue: Fixes #0000 - [ ] Include a change request file using `$ yarn change` #### Description of changes Adding arrow buttons for navigation in `DatepickerCalendar`. Adding child components and exposing them in Datepicker props for consumer overrides **UI before**  **UI after** 
commit sha 2ce05ffc6f2988adfceea3f99c8fee101326f4e6
feat: add imperative handle for Popper, remove warnings (#14131) * feat: add imperative handle for Popper, remove warnings * fix issue, fix UT * fix UTs * add propTypes * update async example
commit sha 9c9ef94404e37645e271d920eb3c715b6adc0f3e
feat: add @fluentui/react-image (#14083) * feat: add @fluentui/react-image * Change files * add API file * fix deps * Update packages/react-image/src/components/Image/useImage.ts Co-authored-by: Makoto Morimoto <[email protected]> * Update packages/react-image/src/components/Image/ImageBase.tsx Co-authored-by: Makoto Morimoto <[email protected]> * Update packages/react-image/tsconfig.json Co-authored-by: Elizabeth Craig <[email protected]> * Update packages/react-image/package.json * update types * fix versions Co-authored-by: Makoto Morimoto <[email protected]> Co-authored-by: Elizabeth Craig <[email protected]>
commit sha fe2f59ab230033eeaca58bc7c16d5096d922faf7
Best Practices Docs Update Branch (#13887) Major overhaul of component documentation markdown content
commit sha 41bc48a4656ff7ebff0e4643b26a4fa17215f7ce
Rename release.md to RELEASE_NOTES.md
commit sha 50b712e1326f93f4d22f81ebdf83fcce48b7f070
Update RELEASE_NOTES.md
commit sha 7236cfa7f9784c7a8a42d87ca51db9dd16484d06
Update RELEASE_NOTES.md
commit sha f7feb25732b3c959b6da4abd5a6c1dcb020c16a3
Add simple transform functions to change prop values (#14140) * WIP add transform * add general transforms that work with spread * Change files * clean up propHelper * fix unused import Co-authored-by: Trip Master <[email protected]>
push time in 15 days
push eventmicrosoft/fluentui
commit sha f7feb25732b3c959b6da4abd5a6c1dcb020c16a3
Add simple transform functions to change prop values (#14140) * WIP add transform * add general transforms that work with spread * Change files * clean up propHelper * fix unused import Co-authored-by: Trip Master <[email protected]>
push time in 15 days
PR merged microsoft/fluentui
Description of changes
Added support for powerful transforms that allow for developers to have more control over the prop renaming process.
-Enums are now completely designated to a transform case.
-If a dev wants to simply change a prop's value to a default, they can either use a transform OR use the REPLACEMENTVALUE string in renameProp.
-If a dev wants to apply a mapping of values to change (dangerous is the domain of prop values is unbounded), they can provide a string literal mapping in the prop transform.
-Examples to writing one's own transform exist in transforms.ts. To handle a custom case, the developer needs to know what kind of SyntaxKind their desired value-to-change is, but beyond that, the process is relatively straightforward if they match the existing patterns. There is currently minimal support for developers who want to modify the spread-handling case -- the expected behavior is that it should change values in the same way that a non-spread case would.
pr closed time in 15 days
PR closed microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr closed time in 15 days
Pull request review commentmicrosoft/fluentui
Add simple transform functions to change prop values
+import {+ ts,+ Node,+ SyntaxKind,+ JsxOpeningElement,+ JsxSelfClosingElement,+ VariableDeclarationKind,+ CodeBlockWriter,+} from 'ts-morph';+import { ValueMap } from 'src/codeMods/types';+import { Maybe } from '../../../maybe';++/* Helper function to rename a prop if in a spread operator. */+export function renamePropInSpread(+ element: JsxOpeningElement | JsxSelfClosingElement,+ toRename: string,+ replacementName: string,+ changeValueMap?: ValueMap<string>,+ replacementValue?: string,+) {+ const allAttributes = element.getAttributes();+ allAttributes.forEach(attribute => {+ if (attribute.getKind() === SyntaxKind.JsxSpreadAttribute) {+ /* Get the name of the object that houses the prop. */+ const spreadProp = attribute.getFirstChildByKind(SyntaxKind.Identifier);+ if (+ spreadProp &&+ spreadProp+ .getType()+ .getProperties()+ .some(name => name.getName() === toRename)+ ) {+ /* If we've found our prop inside the object,+ continue attempt to rename it. */+ const propKind = spreadProp.getDefinitions();+ if (propKind.length === 1) {+ const newSpreadName = '__mig' + propKind[0].getName()[0].toUpperCase() + propKind[0].getName().substring(1);+ const newMapName = '__migEnumMap';+ switch (propKind[0].getKind()) {
I know it was like this initially, but I believe that it's time for this switch statement to get put into somethign like a shouldUpdateElementProp function that takes in the kind of the prop and then determines whether or not to run it. The same is true for the spreadProp checks in the above if.
comment created time in 15 days
Pull request review commentmicrosoft/fluentui
Add simple transform functions to change prop values
+import {+ ts,+ Node,+ SyntaxKind,+ JsxOpeningElement,+ JsxSelfClosingElement,+ VariableDeclarationKind,+ CodeBlockWriter,+} from 'ts-morph';+import { ValueMap } from 'src/codeMods/types';+import { Maybe } from '../../../maybe';++/* Helper function to rename a prop if in a spread operator. */+export function renamePropInSpread(+ element: JsxOpeningElement | JsxSelfClosingElement,+ toRename: string,+ replacementName: string,+ changeValueMap?: ValueMap<string>,+ replacementValue?: string,+) {+ const allAttributes = element.getAttributes();+ allAttributes.forEach(attribute => {+ if (attribute.getKind() === SyntaxKind.JsxSpreadAttribute) {+ /* Get the name of the object that houses the prop. */+ const spreadProp = attribute.getFirstChildByKind(SyntaxKind.Identifier);+ if (+ spreadProp &&+ spreadProp+ .getType()+ .getProperties()+ .some(name => name.getName() === toRename)+ ) {+ /* If we've found our prop inside the object,+ continue attempt to rename it. */+ const propKind = spreadProp.getDefinitions();+ if (propKind.length === 1) {+ const newSpreadName = '__mig' + propKind[0].getName()[0].toUpperCase() + propKind[0].getName().substring(1);+ const newMapName = '__migEnumMap';+ switch (propKind[0].getKind()) {+ case ts.ScriptElementKind.constElement:+ case ts.ScriptElementKind.letElement:+ case ts.ScriptElementKind.variableElement:+ case ts.ScriptElementKind.parameterElement: {+ const propContainingObject = propKind[0];+ let newJSXFlag = false;+ const elementType = element.getKind();+ /* Need these data because ELEMENT is invalid if we call propsArrowFunction */+ let blockContainer = getBlockContainer(element);+ if (blockContainer === undefined) {+ blockContainer = propsArrowFunction(element);+ if (blockContainer === undefined) {+ // eslint-disable-next-line no-throw-literal+ throw 'Could not find block container.';
There might not be any cases where this is hit since you're creating it. It's possible that this can be removed.
comment created time in 15 days
Pull request review commentmicrosoft/fluentui
Add simple transform functions to change prop values
+import {+ ts,+ Node,+ SyntaxKind,+ JsxOpeningElement,+ JsxSelfClosingElement,+ VariableDeclarationKind,+ CodeBlockWriter,+} from 'ts-morph';+import { ValueMap } from 'src/codeMods/types';+import { Maybe } from '../../../maybe';++/* Helper function to rename a prop if in a spread operator. */+export function renamePropInSpread(+ element: JsxOpeningElement | JsxSelfClosingElement,+ toRename: string,+ replacementName: string,+ changeValueMap?: ValueMap<string>,+ replacementValue?: string,+) {+ const allAttributes = element.getAttributes();+ allAttributes.forEach(attribute => {+ if (attribute.getKind() === SyntaxKind.JsxSpreadAttribute) {+ /* Get the name of the object that houses the prop. */+ const spreadProp = attribute.getFirstChildByKind(SyntaxKind.Identifier);+ if (+ spreadProp &&+ spreadProp+ .getType()+ .getProperties()+ .some(name => name.getName() === toRename)+ ) {+ /* If we've found our prop inside the object,+ continue attempt to rename it. */+ const propKind = spreadProp.getDefinitions();+ if (propKind.length === 1) {+ const newSpreadName = '__mig' + propKind[0].getName()[0].toUpperCase() + propKind[0].getName().substring(1);+ const newMapName = '__migEnumMap';+ switch (propKind[0].getKind()) {+ case ts.ScriptElementKind.constElement:+ case ts.ScriptElementKind.letElement:+ case ts.ScriptElementKind.variableElement:+ case ts.ScriptElementKind.parameterElement: {+ const propContainingObject = propKind[0];+ let newJSXFlag = false;+ const elementType = element.getKind();+ /* Need these data because ELEMENT is invalid if we call propsArrowFunction */+ let blockContainer = getBlockContainer(element);+ if (blockContainer === undefined) {+ blockContainer = propsArrowFunction(element);+ if (blockContainer === undefined) {+ // eslint-disable-next-line no-throw-literal+ throw 'Could not find block container.';+ }+ newJSXFlag = true;+ }+ const parentContainer = blockContainer.getParentIfKind(SyntaxKind.Block);+ if (parentContainer === undefined) {+ // eslint-disable-next-line no-throw-literal+ throw 'unable to get parent container from block';+ }+ //parentContainer.insertStatements;+ const insertIndex = blockContainer.getChildIndex();+ if (insertIndex === undefined) {+ // eslint-disable-next-line no-throw-literal+ throw 'unable to find child index';+ }+ if (!parentContainer.getVariableStatement(newSpreadName)) {+ parentContainer.insertVariableStatement(insertIndex, {+ declarationKind: VariableDeclarationKind.Const,+ declarations: [+ {+ name: `{${toRename}, ...${newSpreadName}}`,+ initializer: propContainingObject.getName(),+ },+ ],+ });+ }+ if (changeValueMap && !parentContainer.getVariableStatement(newMapName)) {+ parentContainer.insertVariableStatement(insertIndex, {+ declarationKind: VariableDeclarationKind.Const,+ declarations: [+ {+ name: newMapName,+ initializer: JSON.stringify(changeValueMap),+ },+ ],+ });+ }+ let attrToRename = attribute;+ /* attribute is an iterator variable in the forEach function. */+ if (newJSXFlag) {+ const newSpreadProp = Maybe(blockContainer.getFirstDescendantByKind(SyntaxKind.JsxSpreadAttribute));+ const newJSXElem = Maybe(+ blockContainer.getFirstDescendantByKind(+ elementType as SyntaxKind.JsxOpeningElement | SyntaxKind.JsxSelfClosingElement,+ ),+ );+ if (newSpreadProp.just && newJSXElem.just) {+ attrToRename = newSpreadProp.value;+ element = newJSXElem.value;+ }+ }+ /* Cannot use spreadProp because the node has been moved in the AST. */+ attrToRename.replaceWithText(`{...${newSpreadName}}`);+ element.addAttribute({+ name: replacementName,+ initializer: changeValueMap+ ? `{${newMapName}[${toRename}]}`+ : replacementValue+ ? `{${replacementValue}}`+ : `{${toRename}}`,+ });+ break;+ }+ }+ }+ }+ }+ });+}++/* This function is called if no block container could be found,+ meaning that the prop is in a function without a block for code,+ indicating a big-arrow function with no body. We will insert that+ block and then continue. */+function propsArrowFunction(element: JsxOpeningElement | JsxSelfClosingElement) {+ const firstAncestorInBlock = Maybe(+ element.getFirstAncestor(ans => {+ return ans.getKind() === SyntaxKind.ArrowFunction;+ }),+ );+ if (firstAncestorInBlock.just) {
Suggestion: This could be rewritten as a single chain of maybe and then return the maybe since the consuming function still decides what to do with undefined.
So it would look something like
return Maybe(element.getFirstAncestor...)
.then(ans => {
const oldBody = element.getText();
const writer = new CodeBlockWriter();
writer.block(() => {
writer.write('return ');
writer.write(oldBody);
});
element.replaceWithText(writer.toString());
/* Need to re-acquire ELEMENT because of AST changes. */
return ans.getFirstChildByKind(SyntaxKind.Block));
})
.then(newBlock => {
return newBlock.getFirstDescendant(child => {
return child.getKind() === SyntaxKind.ReturnStatement;
});
});
}
comment created time in 15 days
PR closed microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr closed time in 15 days
pull request commentmicrosoft/fluentui
Maybe: Improve chainability, type checking and move to being class based.
Reopen to trigger another rebuild as failure is unrelated.
comment created time in 15 days
PR closed microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr closed time in 15 days
push eventjoschect/office-ui-fabric-react
commit sha 817557b56584d665e7a697d5d81d3b581815241d
CodeMods: Add filtering and improve maybe (#14072) * Codemods: Add in filtering based on cmd line strings * Change files * update maybes null checks * address comments and improve commands structure * fix mod filtering * fix comments
commit sha c198deb1c9aafe2c6de0b1a707d6c9032b6679c5
Add maybe and move just to Something
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha 817557b56584d665e7a697d5d81d3b581815241d
CodeMods: Add filtering and improve maybe (#14072) * Codemods: Add in filtering based on cmd line strings * Change files * update maybes null checks * address comments and improve commands structure * fix mod filtering * fix comments
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha 34da57c2cd02c1c68bc8ae0aad4b5ee4f6cfea51
(react-flex) Creating new react-flex package (#14051) * creating new react-flex package * updating dependency * adding requested changes * adding requested changes
commit sha 19d531374c491eb479ddc057312d1771768fe027
Use new service connection in release pipelines (#14070)
commit sha bd32dc4495932971f783b6451a723c25d4dfb2b7
Legend hover updates value inside donut chart circle (#14055) * When legend is hovered, center of donut chart updates to the value cooresponding to the legend. * Change files * Modified operator * Add return statement
commit sha 4e31634d7914e595032111ba15d6fb87750b5f4b
Update release service connection name (#14077)
commit sha 346cd61df2ce2268f4126eab1b31a173904ff4c2
fix: useFocusRects should resolve window inside useEffect (#14063) * fix: useFocusRects should resolve window inside useEffect * Change files * fix API file
commit sha af064fecc6b264f18fefcfc2b181a510b2bfecaf
applying package updates
commit sha 5874c5755ea454adb9bbea9a5273f1cae5203eda
Panel: pass missing event to onDismiss (#14075) * add missing event * Change files
commit sha 23029b1fa37aac673e664121001c6e15d46bca50
Azure theme style updates across several components (#14014) * 13px across various components, detailslist, datepicker, commandbar, label style updates * Change files * Hiyo's feedback for comments/naming Co-authored-by: Jackie <[email protected]>
commit sha d1212a3808f0ba186dab8d5f714d35958cdc759a
Resolving a typo for useSetTimeout within react-hooks's README.md (#14076) * typo fix * Change files
commit sha 133b16d313c9d2fef08aee3bc7d9b319a40bed02
Copying Modal to react-next, in preparation for converting to function component (#13234) #### Pull request checklist - [X] Include a change request file using `$ yarn change` This change does not modify `Modal`; it simply moves it to react-next for better diffing in the actual conversion PR.
commit sha feb1bbcde7c250792e63a9cd5cb2ad1f7ef9268d
Removing unnecessary link from website footer (#14092) * Quick youtube link fix. * Change files * update selector
commit sha 1752574599d581730c50ada120cf054952493afa
Re-enable editor with better error handling (#14078) #### Pull request checklist - [x] Addresses an existing issue: Fixes #12754 - [x] Include a change request file using `$ yarn change` #### Description of changes #12776 disabled the editor for all examples since the editor was causing out of memory crashes for the list examples (see #12754) and we couldn't quickly figure out why. We think the issue in the list examples has to do with measurement, but it doesn't repro in local builds and therefore is very hard to debug, and no one has had time to look into it more deeply. (I also can't repro it now on the live site when I enable the editor with `?useEditor=1`.) Instead of leaving the editor disabled indefinitely, we should re-enable it with additional logic to hopefully prevent infinite rendering loops in error cases. Generally the editor tries to re-render the last known good children when there's an error, but this was probably contributing to the infinite loop issue. So disable that behavior ~~entirely for list-related examples, and also disable it~~ for any example if more than one error is caught in < 1 second. (EDIT: removed list special case)
commit sha 0894e3feb752839bc00231bac7965df6125ea5f1
Move useRefEffect hook to the react-hooks package (#14054) Move the hook useRefEffect to the react-hooks package and add tests
commit sha 561bb587ebba766eb0cec41533aaf9ebd576e150
applying package updates
commit sha 3d3804475b653024b96f89771c46e0a0f3becbb1
applying package updates
commit sha 7485a3728d69f54dfdc2e1778811065938ddbd20
Charting: Fix sankey chart dark mode text not visble properly (#14082) * Charting: Fix sankey chart dark mode text not visble properly * Add font styles Co-authored-by: Rajesh Goriga <[email protected]>
commit sha dd5f32f6b039d1426a73ad686bf87750cfbc4aaa
Codemod utilities - support for arrow functions when changing values in props (#14095) * WIP add transform * add support for arrow functions * Change files Co-authored-by: Trip Master <[email protected]>
commit sha 4a6bdec34f0858cec60de3701005ea0706f79d48
Dialog: VoiceOver / aria-modal fix (#14096) * add role document to dialog child * update modal snapshots * Change files
commit sha 3a9feb3725b79ed39a5c080906da8957e6f1aec0
DetailsList: fix exception in DetailsRow when selection is undefined. (#14088) * fix exception with selection is undefined * Change files
commit sha 1c3012b212603f34a8bd7b72f43c66176ab27c23
Conditional for valueInsideDonut (#14093) * Updating valueInsideDonut to be set to yAxisCalloutData if the value is defined * Change files
push time in 16 days
push eventmicrosoft/fluentui
commit sha 817557b56584d665e7a697d5d81d3b581815241d
CodeMods: Add filtering and improve maybe (#14072) * Codemods: Add in filtering based on cmd line strings * Change files * update maybes null checks * address comments and improve commands structure * fix mod filtering * fix comments
push time in 16 days
PR merged microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
Adds in filtering by adding in Yargs to help parse the command line and then creating a getFilter function. Also moves some things around to streamline upgrade command.
Focus areas to test
(optional)
pr closed time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha 34da57c2cd02c1c68bc8ae0aad4b5ee4f6cfea51
(react-flex) Creating new react-flex package (#14051) * creating new react-flex package * updating dependency * adding requested changes * adding requested changes
commit sha 19d531374c491eb479ddc057312d1771768fe027
Use new service connection in release pipelines (#14070)
commit sha bd32dc4495932971f783b6451a723c25d4dfb2b7
Legend hover updates value inside donut chart circle (#14055) * When legend is hovered, center of donut chart updates to the value cooresponding to the legend. * Change files * Modified operator * Add return statement
commit sha 4e31634d7914e595032111ba15d6fb87750b5f4b
Update release service connection name (#14077)
commit sha 346cd61df2ce2268f4126eab1b31a173904ff4c2
fix: useFocusRects should resolve window inside useEffect (#14063) * fix: useFocusRects should resolve window inside useEffect * Change files * fix API file
commit sha af064fecc6b264f18fefcfc2b181a510b2bfecaf
applying package updates
commit sha 5874c5755ea454adb9bbea9a5273f1cae5203eda
Panel: pass missing event to onDismiss (#14075) * add missing event * Change files
commit sha 23029b1fa37aac673e664121001c6e15d46bca50
Azure theme style updates across several components (#14014) * 13px across various components, detailslist, datepicker, commandbar, label style updates * Change files * Hiyo's feedback for comments/naming Co-authored-by: Jackie <[email protected]>
commit sha d1212a3808f0ba186dab8d5f714d35958cdc759a
Resolving a typo for useSetTimeout within react-hooks's README.md (#14076) * typo fix * Change files
commit sha 133b16d313c9d2fef08aee3bc7d9b319a40bed02
Copying Modal to react-next, in preparation for converting to function component (#13234) #### Pull request checklist - [X] Include a change request file using `$ yarn change` This change does not modify `Modal`; it simply moves it to react-next for better diffing in the actual conversion PR.
commit sha feb1bbcde7c250792e63a9cd5cb2ad1f7ef9268d
Removing unnecessary link from website footer (#14092) * Quick youtube link fix. * Change files * update selector
commit sha 1752574599d581730c50ada120cf054952493afa
Re-enable editor with better error handling (#14078) #### Pull request checklist - [x] Addresses an existing issue: Fixes #12754 - [x] Include a change request file using `$ yarn change` #### Description of changes #12776 disabled the editor for all examples since the editor was causing out of memory crashes for the list examples (see #12754) and we couldn't quickly figure out why. We think the issue in the list examples has to do with measurement, but it doesn't repro in local builds and therefore is very hard to debug, and no one has had time to look into it more deeply. (I also can't repro it now on the live site when I enable the editor with `?useEditor=1`.) Instead of leaving the editor disabled indefinitely, we should re-enable it with additional logic to hopefully prevent infinite rendering loops in error cases. Generally the editor tries to re-render the last known good children when there's an error, but this was probably contributing to the infinite loop issue. So disable that behavior ~~entirely for list-related examples, and also disable it~~ for any example if more than one error is caught in < 1 second. (EDIT: removed list special case)
commit sha 0894e3feb752839bc00231bac7965df6125ea5f1
Move useRefEffect hook to the react-hooks package (#14054) Move the hook useRefEffect to the react-hooks package and add tests
commit sha 561bb587ebba766eb0cec41533aaf9ebd576e150
applying package updates
commit sha 3d3804475b653024b96f89771c46e0a0f3becbb1
applying package updates
commit sha 7485a3728d69f54dfdc2e1778811065938ddbd20
Charting: Fix sankey chart dark mode text not visble properly (#14082) * Charting: Fix sankey chart dark mode text not visble properly * Add font styles Co-authored-by: Rajesh Goriga <[email protected]>
commit sha dd5f32f6b039d1426a73ad686bf87750cfbc4aaa
Codemod utilities - support for arrow functions when changing values in props (#14095) * WIP add transform * add support for arrow functions * Change files Co-authored-by: Trip Master <[email protected]>
commit sha 4a6bdec34f0858cec60de3701005ea0706f79d48
Dialog: VoiceOver / aria-modal fix (#14096) * add role document to dialog child * update modal snapshots * Change files
commit sha 3a9feb3725b79ed39a5c080906da8957e6f1aec0
DetailsList: fix exception in DetailsRow when selection is undefined. (#14088) * fix exception with selection is undefined * Change files
commit sha 1c3012b212603f34a8bd7b72f43c66176ab27c23
Conditional for valueInsideDonut (#14093) * Updating valueInsideDonut to be set to yAxisCalloutData if the value is defined * Change files
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha 6d7bfb7301c3bb9adde6464bc254bac386fce598
convert Just to Something
push time in 16 days
Pull request review commentmicrosoft/fluentui
CodeMods: Add filtering and improve maybe
const _makeMaybe = <T>(): MB<T> => { }; export interface Just<T> extends MB<T> {- value: T;+ value: NonNullable<T>; just: true; } export interface Nothing<T> extends MB<T> { just: false; } -export type Maybe<T> = Just<NonNullable<T>> | Nothing<NonNullable<T>>;+export type Maybe<T> = Just<T> | Nothing<T>; // Need to use assign so that the object remains correctly bound to the methods. export const Nothing = <T>(): Nothing<T> => Object.assign<MB<T>, { just: false }>(_makeMaybe(), { just: false }); -export const Just = <T>(value: NonNullable<T>): Just<NonNullable<T>> => {+export const Just = <T>(value: NonNullable<T>): Just<T> => {
Also the just property is a way of ensuring that the types, Just and Nothing are distinguishable. So that property name would end up changing too.
It's following the way that Maybe works in some other libraries, but another naming convention would be to rename it Some which follows Rust's option type.
comment created time in 16 days
Pull request review commentmicrosoft/fluentui
CodeMods: Add filtering and improve maybe
const _makeMaybe = <T>(): MB<T> => { }; export interface Just<T> extends MB<T> {- value: T;+ value: NonNullable<T>; just: true; } export interface Nothing<T> extends MB<T> { just: false; } -export type Maybe<T> = Just<NonNullable<T>> | Nothing<NonNullable<T>>;+export type Maybe<T> = Just<T> | Nothing<T>; // Need to use assign so that the object remains correctly bound to the methods. export const Nothing = <T>(): Nothing<T> => Object.assign<MB<T>, { just: false }>(_makeMaybe(), { just: false }); -export const Just = <T>(value: NonNullable<T>): Just<NonNullable<T>> => {+export const Just = <T>(value: NonNullable<T>): Just<T> => {
The just property is different than the Just function. I like having Just as both a function and a type. I'd be happy to rename it to something more explicit, but I'll do that in another PR.
comment created time in 16 days
push eventjoschect/office-ui-fabric-react
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha 34da57c2cd02c1c68bc8ae0aad4b5ee4f6cfea51
(react-flex) Creating new react-flex package (#14051) * creating new react-flex package * updating dependency * adding requested changes * adding requested changes
commit sha 19d531374c491eb479ddc057312d1771768fe027
Use new service connection in release pipelines (#14070)
commit sha bd32dc4495932971f783b6451a723c25d4dfb2b7
Legend hover updates value inside donut chart circle (#14055) * When legend is hovered, center of donut chart updates to the value cooresponding to the legend. * Change files * Modified operator * Add return statement
commit sha 4e31634d7914e595032111ba15d6fb87750b5f4b
Update release service connection name (#14077)
commit sha 346cd61df2ce2268f4126eab1b31a173904ff4c2
fix: useFocusRects should resolve window inside useEffect (#14063) * fix: useFocusRects should resolve window inside useEffect * Change files * fix API file
commit sha af064fecc6b264f18fefcfc2b181a510b2bfecaf
applying package updates
commit sha 5874c5755ea454adb9bbea9a5273f1cae5203eda
Panel: pass missing event to onDismiss (#14075) * add missing event * Change files
commit sha 23029b1fa37aac673e664121001c6e15d46bca50
Azure theme style updates across several components (#14014) * 13px across various components, detailslist, datepicker, commandbar, label style updates * Change files * Hiyo's feedback for comments/naming Co-authored-by: Jackie <[email protected]>
commit sha d1212a3808f0ba186dab8d5f714d35958cdc759a
Resolving a typo for useSetTimeout within react-hooks's README.md (#14076) * typo fix * Change files
commit sha 133b16d313c9d2fef08aee3bc7d9b319a40bed02
Copying Modal to react-next, in preparation for converting to function component (#13234) #### Pull request checklist - [X] Include a change request file using `$ yarn change` This change does not modify `Modal`; it simply moves it to react-next for better diffing in the actual conversion PR.
commit sha feb1bbcde7c250792e63a9cd5cb2ad1f7ef9268d
Removing unnecessary link from website footer (#14092) * Quick youtube link fix. * Change files * update selector
commit sha 1752574599d581730c50ada120cf054952493afa
Re-enable editor with better error handling (#14078) #### Pull request checklist - [x] Addresses an existing issue: Fixes #12754 - [x] Include a change request file using `$ yarn change` #### Description of changes #12776 disabled the editor for all examples since the editor was causing out of memory crashes for the list examples (see #12754) and we couldn't quickly figure out why. We think the issue in the list examples has to do with measurement, but it doesn't repro in local builds and therefore is very hard to debug, and no one has had time to look into it more deeply. (I also can't repro it now on the live site when I enable the editor with `?useEditor=1`.) Instead of leaving the editor disabled indefinitely, we should re-enable it with additional logic to hopefully prevent infinite rendering loops in error cases. Generally the editor tries to re-render the last known good children when there's an error, but this was probably contributing to the infinite loop issue. So disable that behavior ~~entirely for list-related examples, and also disable it~~ for any example if more than one error is caught in < 1 second. (EDIT: removed list special case)
commit sha 0894e3feb752839bc00231bac7965df6125ea5f1
Move useRefEffect hook to the react-hooks package (#14054) Move the hook useRefEffect to the react-hooks package and add tests
commit sha 561bb587ebba766eb0cec41533aaf9ebd576e150
applying package updates
commit sha 3d3804475b653024b96f89771c46e0a0f3becbb1
applying package updates
commit sha 7485a3728d69f54dfdc2e1778811065938ddbd20
Charting: Fix sankey chart dark mode text not visble properly (#14082) * Charting: Fix sankey chart dark mode text not visble properly * Add font styles Co-authored-by: Rajesh Goriga <[email protected]>
commit sha dd5f32f6b039d1426a73ad686bf87750cfbc4aaa
Codemod utilities - support for arrow functions when changing values in props (#14095) * WIP add transform * add support for arrow functions * Change files Co-authored-by: Trip Master <[email protected]>
commit sha 4a6bdec34f0858cec60de3701005ea0706f79d48
Dialog: VoiceOver / aria-modal fix (#14096) * add role document to dialog child * update modal snapshots * Change files
commit sha 3a9feb3725b79ed39a5c080906da8957e6f1aec0
DetailsList: fix exception in DetailsRow when selection is undefined. (#14088) * fix exception with selection is undefined * Change files
commit sha 1c3012b212603f34a8bd7b72f43c66176ab27c23
Conditional for valueInsideDonut (#14093) * Updating valueInsideDonut to be set to yAxisCalloutData if the value is defined * Change files
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha d644905bf65f0398c87b4667d79fc39230970bb6
fix comments
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha 4bfeebcf4951ad253dccab6e0b293a66ee271b84
minor comment
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha ce04bc2338157303cb9d5c803a274f79aace168c
fix recurisve flatten type
push time in 16 days
PR merged microsoft/fluentui
Description of changes
Currently, the prop-renaming utility does not support examples like this:
export const RenderSpinnerPropsArrow = (props: ISpinnerProps): any => <Spinner {...props} />;
where there is no function body to modify the value any part of the prop object. This PR pushes a fix that would turn the above code into something like the following:
export const RenderSpinnerPropsArrow = (props: ISpinnerProps): any =>
{
const __migEnumMap = {"SpinnerType.normal":"SpinnerSize.medium","SpinnerType.large":"SpinnerSize.large"};
const {type, ...__migProps} = props;
return <Spinner size = {__migEnumMap[type]} {...__migProps} />
}
In the below example, the user provided a mapping of old to new enum values.
pr closed time in 16 days
push eventmicrosoft/fluentui
commit sha dd5f32f6b039d1426a73ad686bf87750cfbc4aaa
Codemod utilities - support for arrow functions when changing values in props (#14095) * WIP add transform * add support for arrow functions * Change files Co-authored-by: Trip Master <[email protected]>
push time in 16 days
push eventjoschect/office-ui-fabric-react
commit sha ee339a90eae3bcfa577f5d0c1f77078eb1936445
minor name change
push time in 17 days
push eventjoschect/office-ui-fabric-react
commit sha 3bbe61d1a34f140360acef872366900914fb0a6c
improve typings a bit
push time in 17 days
PR opened microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr created time in 17 days
create barnchjoschect/office-ui-fabric-react
created branch time in 17 days
push eventjoschect/office-ui-fabric-react
commit sha 93107f43e4f0b1a7561b258e004b454621425686
fix mod filtering
push time in 19 days
push eventjoschect/office-ui-fabric-react
commit sha a6c44443c3001931d15f179a2b263a5d8c5a6ffc
address comments and improve commands structure
push time in 20 days
Pull request review commentmicrosoft/fluentui
CodeMods: Add filtering and improve maybe
export function loadMod(path: string, errorCallback: (e: Error) => void): Maybe< return Nothing(); } -// eslint-disable-next-line @typescript-eslint/no-explicit-any-export function filterMods(codeMods: CodeMod<any>[], semverRange: Range) {- return codeMods.filter(mod => shouldRunMod(mod, semverRange));+export function getEnabledMods(getPaths = getModsPaths, loadM = loadMod) {+ return getPaths()+ .map(pth => {+ console.log('fetching codeMod at ', pth);+ return loadM(pth, e => {+ console.error(e);
I'll add either in another pr along with monads.
comment created time in 20 days
Pull request review commentmicrosoft/fluentui
CodeMods: Add filtering and improve maybe
-export class CommandParserResult {- // path: string = ""; TODO this doesn't work with jest; why?- constructor(public shouldExit = false, public path = '') {}+import yarr from 'yargs';+import { Maybe, Nothing } from './maybe';+export interface CommandParserResult {+ shouldExit?: boolean;
Per my other comment I'll address this when I make an either. Not because I'll use either but because I think this should be batched there.
comment created time in 20 days
Pull request review commentmicrosoft/fluentui
CodeMods: Add filtering and improve maybe
+import { CodeMod } from '../codeMods/types';+import { Maybe } from '../maybe';++export function getStringFilter(filter: string) {+ const filterString = filter;+ return (modString: string) => {+ return modString === filterString;+ };+}++export function getRegexFilter(filter: string) {+ const regexFilter = new RegExp(filter);+ return (modString: string) => {+ return regexFilter.test(modString);+ };+}++/**+ * Returns a function that will return true if the mod is found in the filters+ */+export function getModFilter<T>(filters: { stringFilter: Maybe<string[]>; regexFilter: Maybe<string[]> }) {+ let filts: ((modString: string) => boolean)[] = [];+ filts = filts.concat(filters.stringFilter.then(v => v.map(getStringFilter)).orElse([]));+ filts = filts.concat(filters.regexFilter.then(v => v.map(getRegexFilter)).orElse([]));++ // Return default filter if no other filters provided+ if (filts.length === 0) {+ return (mod: CodeMod<T>) => true;+ }+ return (mod: CodeMod<T>) => {+ return filts.some(v => v(mod.name));
I'll change it to have includeMods and excludeMods and have them be mutually exclusive to clear that up.
comment created time in 20 days
Pull request review commentmicrosoft/fluentui
CodeMods: Add filtering and improve maybe
import { CommandParser, CommandParserResult } from '../../command'; describe('command parser', () => {- // TODO add back once we need command parser to do more things- // describe("help and usage", () => {- // it("prints a help message when run without arguments", () => {- // let message = "";- // const log = (msg: string) => {- // message = msg;- // };- // new CommandParser(log).parseArgs(["node", "foo"]);- // expect(message).toContain("Usage");- // });-- // it('prints a help message when run without "--help"', () => {- // let message = "";- // const log = (msg: string) => {- // message = msg;- // };- // new CommandParser(log).parseArgs(["node", "foo", "--help"]);- // expect(message).toContain("Usage");- // });+ describe('when called with a single argument', () => {+ let result: CommandParserResult; - // it("directs the program to exit when run without arguments", () => {- // const result = new CommandParser(() => {}).parseArgs(["node", "foo"]);- // expect(result.shouldExit).toBeTruthy();- // });- // });+ beforeAll(() => {+ result = new CommandParser().parseArgs(['node', 'foo', 'bar/baz']);+ }); - describe('when called with a single argument', () => {+ it('does not direct the program to exit', () => {+ expect(result.shouldExit).toBeFalsy();+ });+ });+ describe('parses string filters into an array', () => { let result: CommandParserResult; beforeAll(() => {- result = new CommandParser(() => {- return undefined;- }).parseArgs(['node', 'foo', 'bar/baz']);+ result = new CommandParser().parseArgs(['node', 'foo', 'bar/baz', '--sf', 'one', 'two']); }); - it('returns the path when called with a single argument', () => {- expect(result.path).toEqual('bar/baz');+ it('has two strings parsed', () => {+ expect(result.stringFilter.orElse([]).length).toEqual(2); }); - it('does not direct the program to exit', () => {- expect(result.shouldExit).toBeFalsy();+ it('first string is one', () => {+ expect(result.stringFilter.then(v => v[0]).orElse('')).toEqual('one');
StringFilter is a maybe. Maybe doesn't have a straight map/bind yet.
comment created time in 20 days
PR opened microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
Adds in filtering by adding in Yargs to help parse the command line and then creating a getFilter function. Also moves some things around to streamline upgrade command.
Focus areas to test
(optional)
pr created time in 20 days
push eventjoschect/office-ui-fabric-react
commit sha b170b01148a441b077a1ac7d575663944daea9c7
update maybes null checks
push time in 20 days
push eventjoschect/office-ui-fabric-react
commit sha 4cb75b68e7dbe35feed22f78de9125eaf6cdbba3
Change files
push time in 20 days
push eventjoschect/office-ui-fabric-react
commit sha a2b8806169f5644ed0c415f99f202e47f1b5b2f7
Codemods: Add in filtering based on cmd line strings
push time in 20 days
push eventjoschect/office-ui-fabric-react
commit sha e94ddb76a22232c4f574f32d7f8972cfb48e3808
Allow overriding ContextualMenu's internal List's role (#13908) #### Pull request checklist - [X] Addresses an existing issue: Fixes #13971 - [X] Include a change request file using `$ yarn change` #### Description of changes Currently, the `ContextualMenu` control hard-code the `role` attribute of the internal List as `menu`. In my usage, I want to set a different role, specifically `grid`. There's currently no way to achieve this. In this PR, I'm adding a `role` property to the `IContextualMenuListProps` struct. The idea is that the consumer of `ContextualMenu` would provide a custom implementation of `onRenderMenuList` callback. Inside the callback, it can set the `role` attribute to `grid`, before invoking the default renderer. The default renderer inside `ContextualMenu` is modified to honor the `role` property. If `role` is not set, it falls back to `menu`, hence preserving the existing behavior. #### Focus areas to test Added unit tests.
commit sha 6ddf7d61096e644b7ee3a63abf02629a786a99ac
ESLint: add faster max-len rule (#13994)
commit sha 5d63c38662cc26c0518dbe5b7299b1039e0c02ad
Fix Picker action button screen reader issue by updating activedescendant (#13627) * Point picker activedescendant to suggestions action buttons, update render when leaving action buttons * change file * add test for activedescendant on BasePicker * return undefined activedescendant when loading
commit sha 41c1643be865c1969acacf4d3d896fd80ca29037
Adding CodeSandbox next/northstar templates (#13893) * Add codesandbox template for react-next package * fix version error in package.json * add react-next template to ci.json * add <ThemeProvider> and <Stack> components to fix template rendering * add theme-samples dependency to package.json * fix lint errors in package.json * Add initializeIcons so <SpinButton> can render correctly * Add codesandbox template for react-northstar package components * Update ci.json file with new package * remove unused package and fix index.tsx * Add oufr to package.json * Fix dependency tree to run codesandbox for react-northstar package * Update some package.json dependencies * Update dependencies in react-next template to fix lint errors * Add oufr package to dependencies in package.json * Add react-bindings package to ci.json * fix package order * update package dependencies to fix lint errors * Add explicit typing to index.tsx and clean up json files in both templates * fix lint error * add prettier dependency to react-northstar template * Update just.config.ts file and tsconfig.json file for both templates * update next and northstar templates to use eslint * update package.json
commit sha a0b451a274e96ecedfb55c13276ee6e5777f75c2
Legends: Remove tab stop on legends for data viz (#14019) * Legends:Skip all legends in data viz as it is confusing to non sighted users as they have just gone through the data viz. * Change files * Update snapshots Co-authored-by: Rajesh Goriga <[email protected]>
commit sha ef2d6e26da981f93a3df66c9a2b1cad449cd99ab
applying package updates
commit sha 15ee28cda5ee81da62a00bde74ece8bbfa3abbc6
fix(FocusZone): fix EventListener leak (v0) (#14044)
commit sha 2d5932ce602ab7c38bf8a6aead53cbd42e296c55
chart hover card content component wrapped in styled component (#14038) * wrapping chartHoverCard in styled component and deleting static Theme * Change files Co-authored-by: v-sivsar <[email protected]>
commit sha 042d257c2ebd8a9353a3c8fc9dfdf39084c498dc
fix(FocusZone): fix EventListener leak (#14031) * fix(FocusZone): fix EventListener leak * changelog * address PR comments * address PR comments
commit sha 682f1db2c515d0d2f9db036e108fbe316ec09007
Calendar: Fix onBlur event firing on every date click (#13992) * fix calendar props * Change files * Use event.relatedTarget to stop bubbling of onFocus and onBlur event * Use as prop to cast EventTarget type as Node type * update snapshot * Update packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx Co-authored-by: Xu Gao <[email protected]> * use elementContains for target comparisons Co-authored-by: Xu Gao <[email protected]>
commit sha 30fc4c9ad3b2b9236027b477e27eb742f8419cca
Calendar accessibility fixes (#14032) * adding accessibility fixes for alt+tab to datepicker, turn button -> div if not clickable, and high contrast color selectors * Change files * removing unnecessary !important, fixing two linting errors, fixing high contrast bug in oufr calendar * Change files * addressing comments
commit sha a1f0ef7f1f03a6c0a5f66ae093bb2da22726c186
Maybe: Improve then return and remove thenMaybe (#14045) * fix maybe to correctly wrap return value from then * Change files
commit sha bca273168c554d5a4fee1f7a809316b7dabe7007
Updating SpinButton to a function component within React-Next (#13689) * moving files and updating imports * Change files * api update * updates * quick changes * update * update * api update * update * update * update * updating styles * updates * updates * update * update * bug fix * bug fixes * import correction * updates * import change * quick fix * Removing commented code * Change files * change * Update packages/react-next/src/components/SpinButton/SpinButton.base.tsx Co-authored-by: Makoto Morimoto <[email protected]> * Update packages/react-next/src/components/SpinButton/SpinButton.styles.ts Co-authored-by: Makoto Morimoto <[email protected]> * Update change/@fluentui-react-next-2020-04-30-15-57-11-feat-spin-button.json Co-authored-by: Makoto Morimoto <[email protected]> * pr feedback * update * Delete @uifabric-file-type-icons-2020-06-22-11-41-59-caperez-filetype_cortex_and_shortcut.json * quick fix * pr feedback * pr feedback * quick fix * Change files * Delete DateMath.test.ts * Delete DateValues.ts * Delete DateMath.ts * fix * Rename TimeConstants.ts to timeConstants.ts * Updates to styles prop. Co-authored-by: Makoto Morimoto <[email protected]>
commit sha 8247d915e42b98aceeeaaf0061c1ce3773bd17fb
useMergedRefs: mergedRefs should mutate the function if any of the merged refs mutate (#14053) * Addressing constantly mutating refs to merge. * refs * Addressing constantly mutating refs to merge. (cherry picked from commit f3ac4ce02ce4ea3f4f475bd4c956f18cd20bafe3) * Change files * oops
commit sha 06b783216e8652f356324d10fb5bf8c50a7f44c3
Fix publish by syncing with published versions (#14066) * sync * Change files
commit sha a92d7dc1636d67b1bfe4de640d7d59566d05b4b4
Charting:Add New Sankey chart to charting package (#13982) * Add Sankey chart to charting package * Expose pathColor prop * Change files * Add d3-sankey dependency * Fix tslint * Update yarn.lock file * Fix eslint errors * Fix eslint errors * Update JSX.Element to React.Reactnode Co-authored-by: Rajesh Goriga <[email protected]>
commit sha 4fc60e6201e26e6b1d318628de1559b20be8f00e
Line chart & Vertical bar chart - high contrast of y axis line styles updated (#14037) * line and vertical charts y axis line high contrast styles updated * Change files * change log * test case of vertical bar chart updated Co-authored-by: Jameela Kowsar Shaik (Zen3 Infosolutions America Inc) <[email protected]>
commit sha 1601f2c50737814a91a036df964b481f00b23efb
Add transform function for prop renaming utility for codemods (#14067) * WIP add transform * WIP merge * add new prop transform file * Change files * moved general enum case into a transform Co-authored-by: Trip Master <[email protected]>
commit sha 6072a109ca821510a98245709fc722bed102e246
applying package updates
commit sha 95bccab40c19e336dce92d90295046220f5167b7
Add in filtering for codemods
push time in 20 days
create barnchjoschect/office-ui-fabric-react
created branch time in 20 days
push eventjoschect/office-ui-fabric-react
commit sha 001de9e8c5294858c069f95e832f391532d414c6
Adding filetype mapping for .osts extension (#13970) * Adding file icon mapping support for `osts` extension. * Change files. Updating to add support for .osts extension and properly initializing the filetype icon sample storyboard.
commit sha f1fc8e2c111f85add25e5c1c3470adb2f7b1a01a
applying package updates
commit sha 385517ff6b14786e1ea744f3de61d06a34be7822
[Date-Time] refactor date time examples (#13956) * refactoring the date time examples into separate files to fix storybook. Also fixing bug in Calendar where externally controlled date does not navigate the calendar when the date changes * Change files * fixing auto-import of DateRangeType that broke linter * undoing accidental typo change in the OUFR file
commit sha 559e91a35ec2bde8ae3a7431a8679b5637192ecb
Website icon fix - give icons unique IDs (#13967) SVG icons had hard coded ids. made them unique.
commit sha 20be95a095c9296db1fa735b76ae58191f015171
New macos button and separator (#13910) #### Pull request checklist - [ ] Addresses an existing issue: Fixes #0000 - [x] Include a change request file using `$ yarn change` #### Description of changes We have 2 more new controls coming in for macOS. Let's update the documentation.
commit sha 7fc0a7d046869c5f245661bd606831d9e390a32a
chore(Dropdown): convert to be functional component (#13962) * wip * remove cruft * fix const usage * fix regressions * fix visual regressions * fix lint errors * fix visual regressions * add changelog entries
commit sha f62f03845b9ad5dbfacc094676f0819181c53c13
fix: make getShorthandInfo compatible with `compose()` (#13961)
commit sha 77a67dc27a4a3f546fcfc88732e42da0fa1c9d9e
applying package updates
commit sha 90ac82119ec951273a8bac7b6d3e75cabd3b49a6
chore: use minification for stats task and proper env (#13986)
commit sha d43db14983c012854c144263821109e09ed15310
fix(ChatMessage): remove auto (#13988)
commit sha 8df4df38a9af3fe5dccf54c5db844af4805cfc83
Fix bug: azure-theme CommandBar styles (#13959) * Azure-theme command bar and command bar button style updates * Change files Co-authored-by: Jackie <[email protected]>
commit sha d07846f717c51a003c496c9fcac49e52fc55c8f1
Remove KeytipData usage from Link, Checkbox, Toggle (react-next) (#13742) * export useKeytipData * remove KeytipData usage from Checkbox, add withKeytipData HOC * remove KeytipData for toggle * Remove keytipData for link * update example * cleanups * Change files * resolve comments * avoid adding keytipData prop * fixes * fix keytip set to invisible if addKeytipQueue is called multiple time * resolve comment
commit sha ec36a5c214cfc9a9262f8100013734f61952e95a
DatePicker: showDatePickerPopup should be public (#13981) * showDatePickerPopup as public api * Change files * make method public * api file update * add showdatepicker to interface * build fix
commit sha 47f3eafa6b60d3e12ea5f87c839c4e332364d38a
Update CODEOWNERS for packages/foundation (#13990)
commit sha b369d4a7a47b622366771c39a1520f635d41adf2
chore: bump Babel to latest (#13985) * chore: bump Babel to latest * fix deps * fix UTs * Revert "fix UTs" This reverts commit 2e52b747 * fix yarn.lock
commit sha 7370c100a267785a14c69ee18d8f1e128eaa64b6
Add multi select delimiter to combobox (#13979) * Add multiSelectDelimiter property to ComboBox * Add test for ComboBox.mutliSelectDelimiter property * Change files Co-authored-by: Corey Cahill <[email protected]>
commit sha be5ada5f95814f7daa5485024050bc674865fcab
ContextualMenu accessibility: Fix high contrast style for submenu icon (#13843) * Fix high contrast color for submenu icon * Change files * Add comma * Revert "Add comma" This reverts commit e73d7955f5e5c0e0d20b5563e202a4f81be619a7. * Revert "Fix high contrast color for submenu icon" This reverts commit 36f286f324208742ef2975e38fa6958f8eed146f. * Fix high contrast color for submenu icon * Update snapshot Co-authored-by: Erich Abellera <[email protected]>
commit sha c7b7480e6c59f4ccff7033364e0138bf5e8418de
Website hook fix (#13989) * revert to getId as svg is not a react component * Change files * remove unnecessary color styling on b/w icons and fixed homepage icons
commit sha e105904735ba78f93b9a99862ff3e833248228a8
Adding useSetInterval and useSetTimeout within react-hooks package (#13973)
commit sha e7b119a05ef8a4aa254df00320f3672298617ade
Use ESLint everywhere (#13944) * Delete tslint.json * Remove tslint-rules dep, add eslint-rules dep * Update config files * Delete tslint-rules package * Add no-tslint-comments * Go back to naming convention helper function since override wasn't working * fix lint-staged eslint * Ignore unused disables in lint-staged * All the fixes and renames * Scripts to prevent tslint reintroduction Co-authored-by: KHMakoto <[email protected]>
push time in 20 days
push eventmicrosoft/fluentui
commit sha 1601f2c50737814a91a036df964b481f00b23efb
Add transform function for prop renaming utility for codemods (#14067) * WIP add transform * WIP merge * add new prop transform file * Change files * moved general enum case into a transform Co-authored-by: Trip Master <[email protected]>
push time in 20 days
PR merged microsoft/fluentui
Description of changes
Added the ability for devs to use their own transform functions to replace prop values in codemods. Currently adding more pre-defined utility functions for common use cases, but developers have the ability to introduce custom pieces as well.
pr closed time in 20 days
push eventmicrosoft/fluentui
commit sha a1f0ef7f1f03a6c0a5f66ae093bb2da22726c186
Maybe: Improve then return and remove thenMaybe (#14045) * fix maybe to correctly wrap return value from then * Change files
push time in 21 days
PR merged microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr closed time in 21 days
pull request commentmicrosoft/fluentui
Maybe: Improve then return and remove thenMaybe
Closing and reopening to rebuild
comment created time in 21 days
PR closed microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr closed time in 21 days
PR opened microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr created time in 21 days
push eventjoschect/office-ui-fabric-react
commit sha 7b60d53172f918c049e04fdc44675ad035d0f141
fix maybe to correctly wrap return value from then
commit sha 82711d7ac4b581ff8deec599c75d2a1bf9da4cc6
Change files
push time in 22 days
create barnchjoschect/office-ui-fabric-react
created branch time in 22 days
push eventmicrosoft/fluentui
commit sha f58148f1c36c6801903bd78a31dcd1e05cd103a3
Support for enums in props (#13993) * migrate files between branches * migrate spinner * add spinner * add propsutilities test file * add props tests * fix failing tests * fix commenting * add support for enums in spread attributes * add value-changing * Change files * WIP add maybe to proprename * Add Maybe to props utility * fix undefined and linting errors * linting errors Co-authored-by: Trip Master <[email protected]>
push time in 22 days
PR merged microsoft/fluentui
Description of changes
Add support for a prop-renaming utility that has the ability to modify simple primitives and objects, including enums.
Includes undefined checks with the new Maybe feature.
pr closed time in 22 days
Pull request review commentmicrosoft/fluentui
SplitButton: Initial implementation
+import * as React from 'react';+import { mergeSlotProp, ComposePreparedOptions } from '@fluentui/react-compose';+import { useMenuButton } from '../MenuButton/useMenuButton';+import { SplitButtonProps, SplitButtonState } from './SplitButton.types';++/**+ * The useSplitButton hook processes the SplitButton component props and returns state.+ * @param props - SplitButton props to derive state from.+ */+export const useSplitButton = (+ props: SplitButtonProps,+ ref: React.Ref<HTMLElement>,+ options: ComposePreparedOptions,+): SplitButtonState => {+ const { button, menuButton } = props;+ const { onClick, ...menuButtonProps } = props;++ const menuButtonState = useMenuButton(menuButtonProps, ref, options);+ const { expanded, menu, onClick: onMenuButtonClick, onKeyDown, ...rest } = menuButtonState;++ const state = {+ ...rest,+ 'aria-expanded': expanded,+ expanded,+ onKeyDown,+ tabIndex: 0,
Since we don't have a consistent focus story yet, we could maybe extract "focusablility" out into a separate file/namespace that exports something like const focusable = {tabIndex: 0} as a mixin? That way it can get changed in only one file. Really just a possible suggestion.
comment created time in 22 days
PR closed microsoft/fluentui
Pull request checklist
- [x] Addresses an existing issue: Fixes #13291
- [x] Include a change request file using
$ yarn change
Description of changes
There were two separate issues happening:
- The action buttons in the Suggestions component (search for more and force resolve) did not have
idattributes, and the picker input'saria-activedescendantattribute didn't point to them - The picker didn't rerender when use up/down arrows to move from an action button back to the suggestions list
This PR adds the id sug-selectedAction to the currently highlighted action button (managed by the Suggestions component). BasePicker is updated to set aria-activedescendant to sug-selectedAction when appropriate. It also adds an additional this.forceUpdate() to cause activedescedant to be recalculated and re-rendered when focus moves from the action button back to the options.
pr closed time in 22 days
pull request commentmicrosoft/fluentui
Fix Picker action button screen reader issue by updating activedescendant
Closing and reopening to rebuild!
comment created time in 22 days
Pull request review commentmicrosoft/fluentui
+import {+ JsxAttribute,+ JsxOpeningElement,+ JsxSelfClosingElement,+ SyntaxKind,+ VariableDeclarationKind,+ ts,+ Node,+} from 'ts-morph';+import { EnumMap } from '../types';++export function renameProp(+ instances: (JsxOpeningElement | JsxSelfClosingElement)[],+ toRename: string,+ replacementName: string,+ changeValueMap?: EnumMap<string>,+ replacementValue?: string,+) {+ instances.forEach(val => {+ /* For each instance, first see if desired prop exists in the open. */+ let foundProp = val.getAttribute(toRename);+ if (foundProp) {+ /* If found, do a simple name-replacementName. */+ foundProp.set({ name: replacementName });+ if (changeValueMap) {+ /* Change the value of the enum via map conversion. */+ let enumExp = (foundProp as JsxAttribute)+ .getFirstChildByKind(SyntaxKind.JsxExpression)
I think that there need to be some more null/undefined checks. The getFirstChildByKind can return undefined I believe.
comment created time in 23 days
push eventmicrosoft/fluentui
commit sha 324ca3a816aecec8a780953b4d0d47ce06b114ee
Codemods: Maybe's functions weren't correctly bound to the object. Also add in test (#14015) * first maybe fix * add in test and error for Just * Change files * fix lint
push time in 23 days
PR merged microsoft/fluentui
Pull request checklist
- [ ] Addresses an existing issue: Fixes #0000
- [ ] Include a change request file using
$ yarn change
Description of changes
(give an overview)
Focus areas to test
(optional)
pr closed time in 23 days