Giter Site home page Giter Site logo

ember-learn / deprecation-app Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 69.0 51.55 MB

Deprecation guides for ember.js, ember-data, and ember-cli

Home Page: https://deprecations.emberjs.com/

JavaScript 38.84% HTML 2.68% SCSS 41.05% Handlebars 17.42%
ember emberjs hacktoberfest

deprecation-app's People

Contributors

acorncom avatar amyrlam avatar axyxnz avatar baltazore avatar bertdeblock avatar chriskrycho avatar chrisrng avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar ef4 avatar geneukum avatar ignacemaes avatar ijlee2 avatar jaredgalanis avatar jenweber avatar kategengler avatar kennethlarsen avatar locks avatar mansona avatar minthamie avatar nullvoxpopuli avatar pete-the-pete avatar richgt avatar robbiethewagner avatar rwjblue avatar serenaf avatar sivakumar-kailasam avatar snewcomer avatar wagenet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deprecation-app's Issues

Serena: Id-checking

This is a WIP issue for me to check for all the ids:
Version 1:

  • #toc_observing-container-views-like-arrays
  • #toc_ember-deferredmixin-and-ember-deferred
  • #toc_code-then-code-on-ember-application
  • #toc_global-lookup-of-views
  • #toc_hash-location-paths-without-leading-slashes
  • #toc_more-consistent-handlebars-scope
  • #toc_objectcontroller
  • #toc_access-to-instances-in-initializers
  • #toc_code-in-code-syntax-for-code-each-code
  • #toc_code-as-code-syntax-for-code-with-code
  • #toc_computed-properties-with-a-shared-getter-and-setter
  • #toc_ember-create
  • #toc_ember-keys
  • #toc_ember-oneway
  • #toc_ember-view
  • #toc_ember-containerview
  • #toc_ember-collectionview
  • #toc_set-code-positionalparams-code-as-a-static-property-on-the-class
  • #toc_ember-reducecomputed-ember-arraycomputed
  • #toc_modifying-a-property-within-code-didinsertelement-code
  • #toc_beforeobserver
  • #toc_ember-immediateobserver
  • #toc_arraycontroller
  • #toc_sortablemixin
  • #toc_renderbuffer
  • #toc_using-code-guid-code-and-code-item-code-as-key-in-code-each-code
  • #toc_controller-needs
  • #toc_block-and-multi-argument-unbound-helper
  • #toc_block-and-multi-argument-unbound-helper
  • #toc_ember-freezable
  • #toc_ember-enumerableutils
  • #toc_copyable-frozencopy
  • #toc_using-code-code-for-namespace-in-the-code-render-code-helper
  • #toc_non-standard-ways-of-calling-code-ember-set-code-and-code-ember-get-code
  • #toc_reversed-ember-observer-arguments
  • #toc_ember-createwithmixins
  • #toc_bind-attr
  • #toc_using-code-this-get-template-code
  • #toc_ember-computed-any
  • #toc_view-and-controller-options-on-the-code-each-code-helper
  • #toc_using-the-code-with-code-helper-with-the-code-controller-code-option
  • #toc_handlebars-htmlbars-helpers
  • #toc_using-code-trackedarray-code-or-code-subarray-code
  • #toc_using-code-each-code-as-a-leaf-node-in-a-dependent-key
  • #toc_overriding-code-render-code-when-extending-a-component-or-view

v2:

  • #toc_ember-string-fmt
  • #toc_link-to-s-code-currentwhen-code
  • #toc_initializer-arity
  • #toc_ember-application-registry-ember-applicationinstance-registry
  • #toc_ember-applicationinstance-container
  • #toc_ember-debug-function-options
  • #toc_ember-component-defaultlayout
  • #toc_ember-component-currentstate
  • #toc_function-as-test-in-ember-deprecate-ember-warn-ember-assert
  • #toc_injected-container-access
  • #toc_render-helper-with-block
  • #toc_ember-component-didinitattrs
  • #toc_model-param-in-code-render-code-helper
  • #toc_legacy-support-addons
  • #toc_ember-backburner
  • #toc_ember-binding
  • #toc_use-ember-string-htmlsafe-over-ember-handlebars-safestring
  • #toc_enumerable-contains
  • #toc_code-rendertoelement-code
  • #toc_code-render-code-helper
  • #toc_rendering-into-a-render-helper-that-resolves-to-an-outlet
  • #toc_code-ember-k-code
  • #toc_migrating-from-_lookupfactory-to-factoryfor
  • #toc_arguments-in-component-lifecycle-hooks
  • #toc_ember-router-router-renamed-to-ember-router-_routermicrolib
  • #toc_ember-map-ember-mapwithdefault-and-ember-orderedset-are-deprecated
  • #toc_ember-model_factory_injections-removed
  • #toc_custom-eventmanager-deprecated
  • #toc_controller-content-alias
  • #toc_code-targetobject-code

v3

  • #toc_use-notifypropertychange-instead-of-propertywillchange-and-propertydidchange
  • #toc_getting-the-each-property

Ember CLI v2

  • #toc_migrate-from-brocfile-js-to-ember-cli-build-js
  • #toc_deprecate-utility
  • #toc_base-url
  • #toc_clobbering-addon-options

Ember data v2

  • #toc_non-primitive-defaultvalue-for-model-attributes
  • #toc_restserializer-keyforpolymorphictype
  • #toc_restserializer-normalizehash
  • #toc_global-version-of-ds
  • #toc_ember-date-parse
  • #toc_date-prototype-extension
  • #toc_store-queryrecord-array-response-with-restserializer
  • #toc_recordisloaded
  • #toc_lookupadapter
  • #toc_lookupserializer
  • #toc_store-serialize
  • #toc_jsonserializer-shouldserializehasmany
  • #toc_unused-initializers
  • #toc_hasmanyreference-push-array
  • #toc_hasmanyreference-push-invalid-data
  • #toc_jsonapiserializer-modelnamefrompayloadkey-for-resource
  • #toc_jsonapiserializer-modelnamefrompayloadkey-for-relationship
  • #toc_jsonapiserializer-payloadkeyfrommodelname-for-resource
  • #toc_jsonapiserializer-payloadkeyfrommodelname-for-belongsto-relationship
  • #toc_jsonapiserializer-payloadkeyfrommodelname-for-hasmany-relationship

Explain "Deprecations added in Upcoming Features"

In https://emberjs.com/deprecations/v3.x/ the "Deprecations added in Upcoming Features" section needs additional explanation indicating that the deprecations under that section are meant to be shipped in future releases & that they'll be updated to mention the release they're introduced in as they land in ember or ember data.

The reasoning behind this is that at times certain features might be deprecated in non release channels but might take time to land in a main release, so in order to document them rfc implementors are expected to create a deprecation explanation ahead of time so that they deprecation urls will begin to function.

Rendering bug when rendering contents of version 2.0

I came across a rendering bug when adding content for the deprecations with since set to 2.0, see screenshot.

The generated data only contains "since": 2,

screen shot 2018-01-15 at 22 49 03

@mansona Would you have any idea why it is rendering in this way and it cannot read the 2.0?

Add "guides" search

The current live deprecations page has a search bar which gives results for the guides. Let's add the search component to have the same functionality on this new guides app

Deployment issues

The heroku ember.js buildpack builds this app with prember using ember-cli-deploy. After the build since it notices ember-cli-fastboot in dependencies it assumes that we'd like to serve it as one and starts a fastboot server. This behavior causes issues in our app. What we'd like is for it to just deploy it static mode using heroku static buildpack internally like it would if the fastboot dependency wasn't declared.

We could use the static buildpack instead of the emberjs buildpack. The problem is that we need a build step using the node build pack to let it know which directory to serve. The only hook that we're aware of atm we could use to do this is postinstall in package.json. This didn't work for us in our attempts.

Making the emberjs buildpack understand that this is a static app by looking up premberin app dependencies or using an env variable is one step towards making this work. We would additionally need for the buildpack to use our static.json which would define our error file to use, which is important for certain urls from the old app to work. This is a requirement to use this app with prember.

Alternatives are,

  1. Remove prember temporarily and go live with fastboot mode. Least effort on infra site but needs testing of the app.
  2. Temporarily use netlify but this is troublesome when it comes to managing apps.

We could temporarily go with either solutions to go live while we work with terrance from heroku to figure out how to solve this to have this hosted on heroku with prember.

Production and Staging deployment is not currently working

Howdy folks 👋

I'm creating an issue as a request of @sivakumar-kailasam to keep track of the deployment issues we're having with this new setup. I'll do my best to describe what we need/want and we can go from there.

The first thing is that @locks mentioned there was an error on the backend when you hit an endpoint

2018-02-19T12:04:04.450433+00:00 app[web.1]: Error: You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: The host header did not match a hostWhitelist entry. Host header: deprecations-app-prod.herokuapp.com

This implies to me that fastboot is running this environment. Because of prember fastboot should not be running as part of this deployment at all. Everything is available as a static application. We should turn off fastboot for this application because it is not designed to work that way.

(edit - found the issue when describing it)

The issue is that we have now added the prefix of /deprecations/ to all of the URLs. When going to this url: https://deprecations-app-prod.herokuapp.com/deprecations/ember/v2.x we actually need to serve the index file in the /ember/v2.x folder. The simplest way to do this is to just make the ember app also prefix everything with /deprecations/ and to add that to the prember configuration. @sivakumar-kailasam let me know if you can solve this from a routing perspective but if not I would be inclined to fix it at the ember level 👍

Deprecation guide for Deprecate Globals Resolver RFC

Deprecate Globals Resolver RFC: emberjs/rfcs#331

Here are some notes to help me create a deprecation guide.

  • This is not a full transition guide, just an overview
  • If you can, transition to ember-cli, most of the community uses it
  • What is deprecated
    • Using the globals resolver (use ember-cli resolver instead)
    • Creating a global namespace (just use a directory)
    • Using Ember.TEMPLATES[] array (get template from new resolver)
    • Placing a template directly in index.html (use template precompiler that comes with your Ember version)
  • To adapt your existing build tool and configuration
    • link to repo of new resolver to extend from (https://github.com/ember-cli/ember-resolver)
    • the resolver uses amdStrict module syntax rather than App.NameOfThingTypeOfThing
    • ember-cli provides a nice system for building compatible AMD modules

Edit: I will attempt to draft this myself.

Add support for collections in broccoli-static-site-json

POC implementation:

new StaticSiteJson(`node_modules/@ember/guides-source/guides/`, {
  collections: [{
    src: '/content/ember/v2/**.md',
    output: '/content/ember-v2.json', 
  }, {
    src: '/content/ember/v1/**.md',
    output: '/content/ember-v1.json', 
  }, {
    src: '/content/ember-cli/v1/**.md',
    output: '/content/ember-cli-v1.json', 
  }]
})

Deployment broken

I'm just opening this issue so that we can keep track of the new deployment issues.

https://deprecations-app-prod.herokuapp.com/deprecations/ember/v1.x/#toc_ember-reducecomputedproperty-ember-arraycomputedproperty if you go to that link now it will break with an "Internal Server Error". I'm concerned because that seems to imply that it is running fastboot but we need to make sure that it is only using the prember generated static output.

Also, as per https://github.com/ef4/prember#configuring-your-webserver, we need to make sure we serve _empty.html on 404

Fix incorrect statements about the Ember CLI and deprecation warnings

It turns out that my past PR was wrong. Ember CLI version has no effect on the deprecation warnings shown.

Upgrade your ember-cli version to see which deprecations affect your app, when they are scheduled to change, and how to fix them.

This should say instead something like you can upgrade your app's minor version to see deprecations that will affect your app when a major version is released.

Create index file

Right now when running the deprecation app locally it appears empty as the only content we have is under http://localhost:4200/ember/v2.x.

We should copy the index file from the ember website/deprecations and link to the relevant routes in our app

update html - first heading element should be an H1

Expected:
When the heading elements are used correctly, the styles are implemented appropriately.

There should be 1 h1 element per page- "Deprecations" is an h2 at the moment.
As a result, the other heading elements should be updated to ensure that the html is semantic. h1, then h2, then h3, etc., noting that there can be multiple sibling heading elements but no sibling heading elements should be skipped (i.e., h1 then h3) OR out of order (i.e. h2 then h4 then h3).

Fix code (single ``) styling

Since the id for this title is "locked" as legacy id: non-standard-ways-of-calling-code-ember-set-code-and-code-ember-get-code (aka including the backticks written out as code), we should preserve the backticks in the title. Relates to: #96.

(1) We should fix the styling of backtick code in the left hand side table of contents.

image

(2) We should fix the styling of backtick code in the title in-line.

image

update layout

The layout file for the emberjs website has changed, and this would need to use the same layout so the CSS will implement properly.

Mismatched IDs causing content to not be found

From @locks :

​​We have two problems.
Example: https://deprecations-app-prod.herokuapp.com/deprecations/v3.x/#toc_use-notifypropertychange-instead-of-propertywillchange-and-propertydidchange
​​
​​The URL of the deprecation does not match what is present in the source code: emberjs/ember.js@dabdd89#diff-ad2e085482c0aad203f5f555a3497bcdR63
​​The id listed in the content does not match what is present in the source code: emberjs/ember.js@dabdd89#diff-ad2e085482c0aad203f5f555a3497bcdR61
​​
​​What this means is that when someone clicks on the link from the deprecation warning, they will go to the top of the 3.x page. Further, if they try to do a “find in page” for the deprecation id present in the source code, they will not find a match.

Consider having a form on the app to submit a new deprecation

I would like to lower entry barriers to the various kinds of contributing as much as possible.
In that sense, I was wondering if having a web form that someone can use to submit a deprecation would be useful. I am unsure how we would deal with the whole GitHub auth bit…

Clarify use of private API for deprecation solution

defineProperty is private API, but we suggest it as a way to resolve a deprecation. We should give more guidance for alternatives:

Edward Faulkner’s comments from Slack:

it depends why they’re using it.

  • If they’re trying to use it as a polyfill for the native Object.defineProperty, they should just use that directly. Every browser Ember supports has that, and Ember itself depends on it.
  • If they’re trying to make computed properties on a plain old Javascript object, they should not do that. They should either make the object an Ember.Object and declare computed properties in the normal way, or they should keep the object as a POJO and use Object.defineProperty to make a native getter.
  • If they’re creating computed properties and can’t do it the normal way because they don’t know what the dependent keys are until after construction, they should do their own dependency observation with addObserver and notifyPropertyChange. This is an advanced thing to be doing, more likely in an addon that’s trying to present a whole new API on top of Ember than in an app.

Move `Ember.String` deprecation to v3

Someone—who totally isn't me,—delayed the Ember.String deprecation long enough that whenever it lands, it will be in the 3.x series.

We need to move the following two files from v2 to v3:

To do that you need to move the files from one folder to another, and then update the "until" to "4.0.0".

You don't need to worry about the content for now.

Version Graphics Alignment

The Tomsters are looking a bit off to me on the index page. This is due to inconsistent dimensions in the images. I have a PR that tweaks the images individually through CSS but another option is to copy those images to this repo and scale them in Photoshop. Thoughts?

Current:

screen shot 2018-04-26 at 2 28 29 pm

Proposal:

screen shot 2018-04-26 at 3 29 51 pm

Add ability to pass attributes to broccoli-static-site-json so they come out in the JSON:API output

Currently the broccoli-static-site-json only supports attributes content (from the markdown) and title from the frontmatter.

The implementation is here: https://github.com/stonecircle/broccoli-static-site-json/blob/dc4b7680f75f9549dc62b9960d4bf5a575e5926f/index.js#L24

we would prefer to be able to pass attributes into the constructor:

new StaticSiteJson(`node_modules/@ember/guides-source/guides/`, {
  attributes: ['title', 'since', 'until']
})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.