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:67e70369-501b-ffb7-6cbe-2fd0a420dcba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E98:14700E:9B1985:C69AE3:6B00EF8B |
| html-safe-nonce | 130273717194b2047db273e1f8003456d3261209c2aa2ec5e74cb45603739a9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTk4OjE0NzAwRTo5QjE5ODU6QzY5QUUzOjZCMDBFRjhCIiwidmlzaXRvcl9pZCI6Ijg3ODc2Mjc2MzQ4NzI4NzI4NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8a42fba5ed12688aa0e28671922a1239ff2eddebeca7017f791fb9d055a8937f |
| 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 | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width