Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental Language Toggle #2238

Merged
merged 2 commits into from
Jan 23, 2018
Merged

Experimental Language Toggle #2238

merged 2 commits into from
Jan 23, 2018

Conversation

ammanifold
Copy link
Contributor

Fixes #2124

@@ -225,14 +232,20 @@ export class FunctionNewComponent extends FunctionAppContextComponent implements
});

// if the card doesn't exist, create it based off the template, else add information to the preexisting card
Copy link
Contributor

@ehamai ehamai Jan 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// if the card doesn't exist, create it based off the template, else add information to the preexisting card [](start = 19, length = 109)

Move comment below? #Resolved

languages: [`${template.metadata.language}`],
languages: isExperimental ? [] : [`${template.metadata.language}`],
supportedLanguages: isExperimental ? [] : [`${template.metadata.language}`],
allLanguages: [`${template.metadata.language}`],
Copy link
Contributor

@ehamai ehamai Jan 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between all languages and supported languages? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Languages is both supported and experimental


In reply to: 163297132 [](ancestors = 163297132)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. So experimental is just the diff between all languages minus supportedLanguages.


In reply to: 163298359 [](ancestors = 163298359,163297132)

this.languages.forEach(language => {
const isExperimental = this.allExperimentalLanguages.find((l) => {
return l === language.value;
});
Copy link
Contributor

@ehamai ehamai Jan 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a separate function call? #Resolved

});

this.allLanguages = this.languages.sort((a: DropDownElement<string>, b: DropDownElement<string>) => {
return a.displayLabel > b.displayLabel ? 1 : -1;
Copy link
Contributor

@ehamai ehamai Jan 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a separate function call to sort #Resolved

@ehamai
Copy link
Contributor

ehamai commented Jan 23, 2018

private _buildCreateCardTemplates() {

Just some general feedback that you don't have to take care of right away, but wanted to point out for future reference. I think that we should probably work on is breaking up code blocks more and trying to reuse code. Some people are pretty strict about this and say something like "each method shouldn't be longer than 10 lines". I'm not nearly as strict, but I do think there's merit in trying to functionally break up each method and reusing code. In terms of code readability, this method is pretty difficult to read overall since I can't tell where one code-block starts and the other ends. The harder code is to read, the more likely there will be bugs.


Refers to: AzureFunctions.AngularClient/src/app/function/function-new/function-new.component.ts:165 in 77ae154. [](commit_id = 77ae154, deletion_comment = False)

[name]="'experimentalLanguageSupport' | translate"
[ariaLabelFormat]="'nameAndStateName'"
(change)="switchExperimentalLanguagesOption()">
</slide-toggle>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't it enough for us to just have a dropdown category called "experimental? This just seems like another selection on-top of an existing selection.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we already have the experimental drop-down but even if you are not in on the drop down you still see and have the option to select an experimental language. The toggle will make it such that you can only do those things when you specifically enable them.


In reply to: 163301722 [](ancestors = 163301722)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So should we also remove "experimental" from the dropdown when the toggle is not enabled?


In reply to: 163305118 [](ancestors = 163305118,163301722)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup I put in a check for that :)


In reply to: 163308704 [](ancestors = 163308704,163305118,163301722)

@ammanifold
Copy link
Contributor Author

private _buildCreateCardTemplates() {

Yup I think this should be done here. Initially was using comments to keep things logical but it keeps growing more complex so it would make sense to just move each "block" into it's own function


In reply to: 359849136 [](ancestors = 359849136)


Refers to: AzureFunctions.AngularClient/src/app/function/function-new/function-new.component.ts:165 in 77ae154. [](commit_id = 77ae154, deletion_comment = False)

@@ -323,11 +369,18 @@ export class FunctionNewComponent extends FunctionAppContextComponent implements
dropDownElement.default = true;
}

this.categories.push(dropDownElement);
// only display the experimental category if experimental languages are shown
Copy link
Contributor Author

@ammanifold ammanifold Jan 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// only display the experimental category if experimental languages are shown [](start = 16, length = 77)

@elliott Hamai here is the check

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay, I was looking at _orderedCategoties, but now I realize you were just using that as the original set, not the one that's displayed.


In reply to: 163309277 [](ancestors = 163309277)

Copy link
Contributor

@ehamai ehamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@ammanifold ammanifold merged commit 34bd66c into dev Jan 23, 2018
@ammanifold ammanifold deleted the algrunin-createLanguages branch January 23, 2018 17:29
hartra344 added a commit that referenced this pull request Feb 2, 2018
* Making sure selected option in DropDownComponent matches the selected option in the native select element (fixes #2060)

* Add CRM headers (#2225)

* Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)"

This reverts commit 300746c.

* add keyboard controls to download function app

* CRM headers only on create and delete (#2226)

* rp update

* add headers only on create and delete calls

* pr updates and add headers for get entities

* update delete calls to include headers

* Tentatively remove MSA login for Try Functions

* update icon (#2236)

fixes #2235

* Use ARM url specified from Ibiza for national clouds (#2239)

* Revert "Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)""

This reverts commit 481a96b.

* Use ARM url specified from Ibiza for national clouds

* Fixing CR comments

* Experimental Language Toggle (#2238)

* Experimental Language Toggle

* pr updates

* Add TIP1 to accepted origins (#2242)

* Handling namespace for embedded scenario (#2237)

* Fixes #1592 - [Accessibility] Screen reader does not read tree node options when in focus (#2221)

* Minor embedded updates (#2245)

* update templates and filter out errors

* remove retrieve option

* Fixing runtime upgrade warning string

* Updating Ibiza redirect URL's (#2247)

* Minor fixes to disable some features that don't work in national clouds (#2249)

* Fix all functions caching (#2250)

* Fix all functions caching on create

* update function create calls

* nit update

* Change SiteManage component to open the new App Service Plan blade

* Change Destroy to Delete (#2252)

* Fixing build

* Add durable resources (#2251)

* CICD Rework ( Deployment Center)  (#2205)

* CICD Rework

* Fixing a build break and updating the portal-resources.ts file

* Fixing Resources from a bad merge

* Adding flag in tsc to not check lib typings

* correcting import casing for linux build server

* Fixing issues in build with unused variables

* Polish adjustments dashboard tables and auto refreshing of data

* adding state to bitbucket and github oauth

* cleaned up deployment detail log and fixed some translate pipes

* removing unused variables to make compiler happy

* removing bad debug logging from server code

* Made first pass at a basic summary page

* adding some support for summary of Local Git Choice

* first pass at PR Comments, any that are currently marked resolved should be fixed here

* Adjustments based on PR comments

* Fixing build break

* Update travis.yml angular cli

* Removing nodejs server auth and making pug use minified

* adding production check for optimized js files

* adding AI support on the server

* fixing azure head pug

* Fixing some bugs around loading

* Fixing PR changes

* Hiding Deployment Center behind a feature flag

* Fixing build breaks from last commit

* adjustments based on PR comments

* Last of PR comments

* Fixing file name casing issues for linux builds

* securing session cookie

* fixing file names to match our format

* Addressing PR Comment

* Stop showing invalid connection string types, except when already configured (fixes #2248)

* Adding build badges

* Fixing windows local server running (#2268)

* Fixes #2267 and Fixes #2227 Adding mime type for static json files for iisnode (#2269)

* Let NodeJS handle static file loading

* Trying different fix

* Embedded updates (#2271)

* Add preview and update editor name for embedded

* Add ibiza support for deployment center (#2272)

* Let NodeJS handle static file loading

* Trying different fix

* Adding support for loading deployment center inside of ibiza

* fixing build

* build fixes

* Updated settings file to format TS files on save

* Fixing deployment center to load itself rather than app settings

* Adding site service and generalizing conditional-http-client (#2266)

* Adding site service and generalizing conditional-http-client

* Removing arm-preconditions

* Moving precondition.ts back to where it was originally

* Removing deployment center auth state check from returning auth tokens

* Adding telemetry for AppSettings and creating base FeatureComponent (#2280)

* Adding telemetry for AppSettings and creating base FeatureComponent

* Updating with code review comments

* Added parent component concept to make sure we log feature timings only when a parent exists to represent the entire feature

* Whitelist update and accessibility updates (#2273)

* whitelist update and accessibility updates

* remove comment

* pr updates

* Making sure the form control and displayed value are in sync for the AutoSwapSlotName dropdown (fixes #2275)
hartra344 added a commit that referenced this pull request Feb 13, 2018
* Making sure selected option in DropDownComponent matches the selected option in the native select element (fixes #2060)

* Add CRM headers (#2225)

* Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)"

This reverts commit 300746c.

* add keyboard controls to download function app

* CRM headers only on create and delete (#2226)

* rp update

* add headers only on create and delete calls

* pr updates and add headers for get entities

* update delete calls to include headers

* Tentatively remove MSA login for Try Functions

* update icon (#2236)

fixes #2235

* Use ARM url specified from Ibiza for national clouds (#2239)

* Revert "Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)""

This reverts commit 481a96b.

* Use ARM url specified from Ibiza for national clouds

* Fixing CR comments

* Experimental Language Toggle (#2238)

* Experimental Language Toggle

* pr updates

* Add TIP1 to accepted origins (#2242)

* Handling namespace for embedded scenario (#2237)

* Fixes #1592 - [Accessibility] Screen reader does not read tree node options when in focus (#2221)

* Minor embedded updates (#2245)

* update templates and filter out errors

* remove retrieve option

* Fixing runtime upgrade warning string

* Updating Ibiza redirect URL's (#2247)

* Minor fixes to disable some features that don't work in national clouds (#2249)

* Fix all functions caching (#2250)

* Fix all functions caching on create

* update function create calls

* nit update

* Change SiteManage component to open the new App Service Plan blade

* Change Destroy to Delete (#2252)

* Fixing build

* Add durable resources (#2251)

* CICD Rework ( Deployment Center)  (#2205)

* CICD Rework

* Fixing a build break and updating the portal-resources.ts file

* Fixing Resources from a bad merge

* Adding flag in tsc to not check lib typings

* correcting import casing for linux build server

* Fixing issues in build with unused variables

* Polish adjustments dashboard tables and auto refreshing of data

* adding state to bitbucket and github oauth

* cleaned up deployment detail log and fixed some translate pipes

* removing unused variables to make compiler happy

* removing bad debug logging from server code

* Made first pass at a basic summary page

* adding some support for summary of Local Git Choice

* first pass at PR Comments, any that are currently marked resolved should be fixed here

* Adjustments based on PR comments

* Fixing build break

* Update travis.yml angular cli

* Removing nodejs server auth and making pug use minified

* adding production check for optimized js files

* adding AI support on the server

* fixing azure head pug

* Fixing some bugs around loading

* Fixing PR changes

* Hiding Deployment Center behind a feature flag

* Fixing build breaks from last commit

* adjustments based on PR comments

* Last of PR comments

* Fixing file name casing issues for linux builds

* securing session cookie

* fixing file names to match our format

* Addressing PR Comment

* Stop showing invalid connection string types, except when already configured (fixes #2248)

* Adding build badges

* Fixing windows local server running (#2268)

* Fixes #2267 and Fixes #2227 Adding mime type for static json files for iisnode (#2269)

* Let NodeJS handle static file loading

* Trying different fix

* Embedded updates (#2271)

* Add preview and update editor name for embedded

* Add ibiza support for deployment center (#2272)

* Let NodeJS handle static file loading

* Trying different fix

* Adding support for loading deployment center inside of ibiza

* fixing build

* build fixes

* Updated settings file to format TS files on save

* Fixing deployment center to load itself rather than app settings

* Adding site service and generalizing conditional-http-client (#2266)

* Adding site service and generalizing conditional-http-client

* Removing arm-preconditions

* Moving precondition.ts back to where it was originally

* Removing deployment center auth state check from returning auth tokens

* Adding telemetry for AppSettings and creating base FeatureComponent (#2280)

* Adding telemetry for AppSettings and creating base FeatureComponent

* Updating with code review comments

* Added parent component concept to make sure we log feature timings only when a parent exists to represent the entire feature

* Whitelist update and accessibility updates (#2273)

* whitelist update and accessibility updates

* remove comment

* pr updates

* Making sure the form control and displayed value are in sync for the AutoSwapSlotName dropdown (fixes #2275)

* EventGrid UI support in function2.0. Fixes #2199

* Disable "enable/disable" and "delete" for VS functions

* Add variable cdn url injected at build time

* Setting view cache to true on node server to check performance increase in next

* making cdn url in body.pug correct

* Fixing typo in index.pug that is preventing the rendering in ng-min

* Updating the referenced templates (#2291)

* Fixing web config to add static file mime types

* Make gulp ignore resources made specifically for Visual Studio that aren't used for portal

* Updating template package, fixing resources

* Updating the swagger editor to match the luminosity ratio (#2288)

* manage blade, focus on input when adding key

* [API definition blade] adding role for expand / collapse (#2286)

* Create from Integrate Tab (#2296)

* Embedded templates "type" update (#2295)

* xrmwebhooktrigger replaces synctrigger

* update binding type

* Moving as many pieces as possible to go through CDN rather than directly to the app (#2300)

* Add variable cdn url injected at build time

* trigger build

* Adding Woff Mime type to web.config

* fixing mime map in web.config

* Adding mime types to web config

* moving more assets to load from cdn

* fixing mime types

* adding ttf mime type

* get resources from cdn when possible

* Moving pieces to load from CDN where available

* fixing cdn image loading

* Adding cache breaking cdn calls

* focus on combo box when get function url clicked

* Adding Cache break query for image loading (#2303)

* add role and label to click to show/click to hide

* undo template update (#2305)

* Add redirects for people going directly to functions.azure.com (#2313)

* correct fowarding address for try functions

* Updated Travis CI link

* xrmwebhooktrigger change (#2314)

* Fixes #2267 - Updating conditional http client to handle complex error types being thrown (#2311)

* Fixing TriggerFunctionAPIM api for ASP.Net controller

* Fixing build

* Implement /api/runtimetoken in node server. Closes #2253 (#2298)

* Implement /api/runtimetoken in node server. Closes #2253

* CR 1

* Temporarily updating APIMTrigger API in node for debugging purposes

* Updating site-config to do permission/lock checks after initial load (#2318)

* Updating site-config to do permission/lock checks after initial load

* Add error handling to several components

* Fixing connection string type

* Error handle updates (#2323)

* creation error handle

* update log error catch

* type update

* Support linux function apps that don't have scm endpoint (#2322)

* Support linux function apps that don't have scm endpoint

* Updating site summary and site manage tabs to inherit from FeatureComponent (#2326)

* Updating site summary and site manage tabs to inherit from FeatureComponent

* Updated SiteEnabledFeaturesComponent to be a FeatureComponent

* Cleaning up based on PR feedback

* PR feedback

* Upgrading from Angular 4 to Angular 5 (#2335)

* Update embedded API version (#2336)

* add role link to revoke renew

* removing vendor import script that is not there in Angular 5

* Fixing local loading

* Update embedded logging (#2337)

* update embedded logging

* remove first do/retry

* Only display error on HostStatus === 'Error'. Closes #2330

* Fixing bug in embedded logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants