From 56e102d741fbf7791f478691e8ef2aeeb3a53b35 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Thu, 26 May 2016 00:26:30 +0300 Subject: [PATCH 1/3] docs(tutorial): add deprecation notice to v1.4.x tutorial and point to the correct branch - Add a deprecation notice on the 'index' page. - Hide the "Live Demo" buttons (since we don't have a live demo). - Update the GitHub diff links to point to the `pre-v1.5.0-snapshot` angular-phonecat branch. - Modify all git commangs to use the appropriate branch and tags. Related to #14416. --- docs/app/src/tutorials.js | 19 ++++++++++--------- docs/content/tutorial/index.ngdoc | 23 ++++++++++++++++++++++- docs/content/tutorial/step_00.ngdoc | 2 +- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/docs/app/src/tutorials.js b/docs/app/src/tutorials.js index 84ea6171a743..751f10273e28 100644 --- a/docs/app/src/tutorials.js +++ b/docs/app/src/tutorials.js @@ -11,16 +11,16 @@ angular.module('tutorials', []) scope: {}, template: '
  • Previous
  • \n' + - '
  • Live Demo
  • \n' + - '
  • Code Diff
  • \n' + + // '
  • Live Demo
  • \n' + + '
  • Code Diff
  • \n' + '
  • Next
  • ', link: function(scope, element, attrs) { var seq = 1 * attrs.docTutorialNav; scope.seq = seq; scope.prev = pages[seq]; scope.next = pages[2 + seq]; - scope.diffLo = seq ? (seq - 1): '0~1'; - scope.diffHi = seq; + scope.diffLo = 13 - seq; + scope.diffHi = 12 - seq; element.addClass('btn-group'); element.addClass('tutorial-nav'); @@ -38,12 +38,13 @@ angular.module('tutorials', []) '

    \n' + '
    \n' + '

    Reset the workspace to step {{step}}.

    ' + - '

    git checkout -f step-{{step}}

    \n' + - '

    Refresh your browser or check out this step online: '+ - 'Step {{step}} Live Demo.

    \n' + + '

    git checkout -f old-step-{{step}}

    \n' + + // '

    Refresh your browser or check out this step online: '+ + // 'Step {{step}} Live Demo.

    \n' + + '

    Refresh your browser to see the changes.

    \n' + '
    \n' + '

    The most important changes are listed below. You can see the full diff on ' + - 'GitHub\n' + + 'GitHub.\n' + '

    ' }; -}); \ No newline at end of file +}); diff --git a/docs/content/tutorial/index.ngdoc b/docs/content/tutorial/index.ngdoc index f96c0a2ad5e0..4f33bc7dd6ce 100644 --- a/docs/content/tutorial/index.ngdoc +++ b/docs/content/tutorial/index.ngdoc @@ -5,6 +5,22 @@ # PhoneCat Tutorial App +
    +

    + This version of the tutorial is deprecated and no longer maintained. You can find the most + recent version of the tutorial at https://docs.angularjs.org/tutorial/. +

    +

    + It is recommended to use the latest tutorial version for the following reasons: +

    +

    +
    + A great way to get introduced to AngularJS is to work through this tutorial, which walks you through the construction of an AngularJS web app. The app you will build is a catalog that displays a list of Android devices, lets you filter the list to see only devices that interest you, and then view @@ -73,7 +89,7 @@ Clone the [angular-phonecat repository][angular-phonecat] located at GitHub by r command: ``` -git clone --depth=14 https://github.com/angular/angular-phonecat.git +git clone --depth=14 --branch=pre-v1.5.0-snapshot https://github.com/angular/angular-phonecat.git ``` This command creates the `angular-phonecat` directory in your current directory. @@ -82,6 +98,11 @@ This command creates the `angular-phonecat` directory in your current directory. download much smaller and faster. +
    + The `--branch=pre-v1.5.0-snapshot` option tells Git to pull down the `pre-v1.5.0-snapshot` branch. + The code for this older version of the tutorial is on that branch. +
    + Change your current directory to `angular-phonecat`. ``` diff --git a/docs/content/tutorial/step_00.ngdoc b/docs/content/tutorial/step_00.ngdoc index 1a83fdf5ed2a..280d6da87a18 100644 --- a/docs/content/tutorial/step_00.ngdoc +++ b/docs/content/tutorial/step_00.ngdoc @@ -16,7 +16,7 @@ dependencies, as described in {@link index#get-started Get Started}. In the `angular-phonecat` directory, run this command: ``` -git checkout -f step-0 +git checkout -f old-step-0 ``` From 9d06681531288ea8a459ccb61125638630e855bb Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Fri, 27 May 2016 13:19:55 +0300 Subject: [PATCH 2/3] fixup 1 --- docs/app/src/tutorials.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/app/src/tutorials.js b/docs/app/src/tutorials.js index 751f10273e28..7ed3a5d36d22 100644 --- a/docs/app/src/tutorials.js +++ b/docs/app/src/tutorials.js @@ -11,16 +11,15 @@ angular.module('tutorials', []) scope: {}, template: '
  • Previous
  • \n' + - // '
  • Live Demo
  • \n' + - '
  • Code Diff
  • \n' + + '
  • Code Diff
  • \n' + '
  • Next
  • ', link: function(scope, element, attrs) { var seq = 1 * attrs.docTutorialNav; scope.seq = seq; scope.prev = pages[seq]; scope.next = pages[2 + seq]; - scope.diffLo = 13 - seq; - scope.diffHi = 12 - seq; + scope.diffLo = seq ? (seq - 1): '0~1'; + scope.diffHi = seq; element.addClass('btn-group'); element.addClass('tutorial-nav'); @@ -39,12 +38,10 @@ angular.module('tutorials', []) '
    \n' + '

    Reset the workspace to step {{step}}.

    ' + '

    git checkout -f old-step-{{step}}

    \n' + - // '

    Refresh your browser or check out this step online: '+ - // 'Step {{step}} Live Demo.

    \n' + '

    Refresh your browser to see the changes.

    \n' + '
    \n' + '

    The most important changes are listed below. You can see the full diff on ' + - 'GitHub.\n' + + 'GitHub\n' + '

    ' }; }); From 90493dc3efbddd44aa945fdddc6fbf5d20fc09a7 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Tue, 31 May 2016 12:21:41 +0300 Subject: [PATCH 3/3] fixup 2 - Rename branch: `pre-v1.5.0-snapshot` --> `1.4-snapshot` - Rename steps: `old-step-*` --> `1.4-step-*` --- docs/app/src/tutorials.js | 6 +++--- docs/content/tutorial/index.ngdoc | 4 ++-- docs/content/tutorial/step_00.ngdoc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/app/src/tutorials.js b/docs/app/src/tutorials.js index 7ed3a5d36d22..7f3b1c195069 100644 --- a/docs/app/src/tutorials.js +++ b/docs/app/src/tutorials.js @@ -11,7 +11,7 @@ angular.module('tutorials', []) scope: {}, template: '
  • Previous
  • \n' + - '
  • Code Diff
  • \n' + + '
  • Code Diff
  • \n' + '
  • Next
  • ', link: function(scope, element, attrs) { var seq = 1 * attrs.docTutorialNav; @@ -37,11 +37,11 @@ angular.module('tutorials', []) '

    \n' + '
    \n' + '

    Reset the workspace to step {{step}}.

    ' + - '

    git checkout -f old-step-{{step}}

    \n' + + '

    git checkout -f 1.4-step-{{step}}

    \n' + '

    Refresh your browser to see the changes.

    \n' + '
    \n' + '

    The most important changes are listed below. You can see the full diff on ' + - 'GitHub\n' + + 'GitHub\n' + '

    ' }; }); diff --git a/docs/content/tutorial/index.ngdoc b/docs/content/tutorial/index.ngdoc index 4f33bc7dd6ce..44803b3eed27 100644 --- a/docs/content/tutorial/index.ngdoc +++ b/docs/content/tutorial/index.ngdoc @@ -89,7 +89,7 @@ Clone the [angular-phonecat repository][angular-phonecat] located at GitHub by r command: ``` -git clone --depth=14 --branch=pre-v1.5.0-snapshot https://github.com/angular/angular-phonecat.git +git clone --depth=14 --branch=1.4-snapshot https://github.com/angular/angular-phonecat.git ``` This command creates the `angular-phonecat` directory in your current directory. @@ -99,7 +99,7 @@ download much smaller and faster.
    - The `--branch=pre-v1.5.0-snapshot` option tells Git to pull down the `pre-v1.5.0-snapshot` branch. + The `--branch=1.4-snapshot` option tells Git to pull down the `1.4-snapshot` branch. The code for this older version of the tutorial is on that branch.
    diff --git a/docs/content/tutorial/step_00.ngdoc b/docs/content/tutorial/step_00.ngdoc index 280d6da87a18..9e496c92b958 100644 --- a/docs/content/tutorial/step_00.ngdoc +++ b/docs/content/tutorial/step_00.ngdoc @@ -16,7 +16,7 @@ dependencies, as described in {@link index#get-started Get Started}. In the `angular-phonecat` directory, run this command: ``` -git checkout -f old-step-0 +git checkout -f 1.4-step-0 ```