Title: Implement declarative pattern for "fab-" components · Issue #3 · microsoft/angular-react · GitHub
Open Graph Title: Implement declarative pattern for "fab-" components · Issue #3 · microsoft/angular-react
X Title: Implement declarative pattern for "fab-" components · Issue #3 · microsoft/angular-react
Description: From Ben Feely (@benfeely) on July 12, 2018 18:20 The initial effort to create wrappers for Fabric components is targeted at closely following the React Fabric API. This means implementing a largely imperative pattern, particularly for s...
Open Graph Description: From Ben Feely (@benfeely) on July 12, 2018 18:20 The initial effort to create wrappers for Fabric components is targeted at closely following the React Fabric API. This means implementing a largel...
X Description: From Ben Feely (@benfeely) on July 12, 2018 18:20 The initial effort to create wrappers for Fabric components is targeted at closely following the React Fabric API. This means implementing a largel...
Opengraph URL: https://github.com/microsoft/angular-react/issues/3
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Implement declarative pattern for \"fab-\" components","articleBody":"_From @benfeely on July 12, 2018 18:20_\n\nThe initial effort to create wrappers for Fabric components is targeted at closely following the React Fabric API. This means implementing a largely imperative pattern, particularly for scenarios such as defining \"items\" within a \"CommandBar\". Following the react pattern, these items are defined by passing in an object as a property. Although this is a valid pattern, the Angular community tends to lean more towards a declarative model...\r\n\r\n### Imperative\r\nThis is the initial implementation which follows the React Fabric API for the component closely.\r\n**Component** \r\n```javascript\r\ncommandBarItems: ICommandBarItemOptions[] = [\r\n {\r\n key: 'run',\r\n text: 'Run',\r\n iconProps: {\r\n iconName: 'CaretRight',\r\n },\r\n disabled: true,\r\n },\r\n {\r\n key: 'custom-element',\r\n onClick: () => {\r\n console.log('custom element clicked');\r\n },\r\n render: this._customCbItemRef/* this.customCbItemTemplate */,\r\n },\r\n];\r\n```\r\n**Template**\r\n```html\r\n\u003cfab-command-bar #commandBar [items]=\"commandBarItems\" [farItems]=\"commandBarFarItems\">\r\n\u003c/fab-command-bar>\r\n```\r\n\r\n### Declarative\r\nThis is the proposed implementation to add to the extend the API and allow for declarative syntax (preferred by many Angular teams).\r\n```html\r\n\u003cfab-command-bar #commandBar [items]=\"commandBarItems\" [farItems]=\"commandBarFarItems\">\r\n \u003citems>\r\n \u003cfab-action-button [iconProps]=\"{ iconName: 'AddFriend' }\" text=\"Compound\" [secondaryText]=\"'Loren ipsum dolor sit amet'\" (onClick)=\"onActionButtonClicked($event)\">\u003c/fab-action-button>\r\n\r\n \u003cfab-compound-button [iconProps]=\"{ iconName: 'AddFriend' }\" [secondaryText]=\"'Loren ipsum dolor sit amet'\" (onClick)=\"onCompoundButtonClicked($event)\" text=\"Compound\">\u003c/fab-compound-button>\r\n \u003citems>\r\n \u003cfar-items>\r\n ...\r\n \u003cfar-items>\r\n\u003c/fab-command-bar>\r\n```\r\n\r\nNote: This proposal is based on Commercial Store's implementation of BSX-List (which is patterned after the Angular Material list and other components). Please see BSX-List [source](https://microsoft.visualstudio.com/Universal%20Store/CS%20Management/_git/BSX.Portal.Client?path=%2Fsrc%2Fapp%2Fshared%2Fcontrols%2Fbsx-list&version=GBmaster) for implementation examples.\n\n_Copied from original issue: benfeely/angular-react#11_","author":{"url":"https://github.com/bengry","@type":"Person","name":"bengry"},"datePublished":"2018-08-12T08:05:59Z","url":"https://github.com/microsoft/angular-react/issues/3"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4c0b63b7-492c-6b9d-44f7-aa84a547bada |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8BF6:A99C2:F36AA5:138CEAF:6B00FB66 |
| html-safe-nonce | e01150ed8935828996e6318e8de21f70efc0788594bcb5caa1eb5c373ce90c52 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkY2OkE5OUMyOkYzNkFBNToxMzhDRUFGOjZCMDBGQjY2IiwidmlzaXRvcl9pZCI6IjgzOTAzNDMyNjczNjcwNTgyNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4f5a2d35601567e51761f9e9aba01017df8cb8e9d40cffe26d0142d3bb85eef5 |
| hovercard-subject-tag | issue:349793533 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Microsoft/angular-react/3/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a33ebc40478c19e40607062bc814a12a6df2c14437a05524c677087ac5964907/microsoft/angular-react/issues/3 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a33ebc40478c19e40607062bc814a12a6df2c14437a05524c677087ac5964907/microsoft/angular-react/issues/3 |
| og:image:alt | From Ben Feely (@benfeely) on July 12, 2018 18:20 The initial effort to create wrappers for Fabric components is targeted at closely following the React Fabric API. This means implementing a largel... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bengry |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/angular-react git https://github.com/microsoft/angular-react.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 144321557 |
| octolytics-dimension-repository_nwo | microsoft/angular-react |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 144321557 |
| octolytics-dimension-repository_network_root_nwo | microsoft/angular-react |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width