Git Product home page Git Product logo

guides-app's Introduction

[deprecated] Ember Guides App

This repository was the source for the Ember App that used to power the Ember.js Guides. This work has since been extracted into Guidemaker and the Guidemaker Ember Template.

The source for the guides is still avaliable in the same place in the Guides Source repository.

Contributing

All further work will be done on Guidemaker, the Guidemaker Ember Template and Guides Source.

If you are interested in contributing then you can check out the contributing instructions for the Guides Source.

If you have questions you can join the #dev-ember-learning channel in the Ember Community Discord.

guides-app's People

Contributors

acorncom avatar anotheredward avatar chrismou avatar danmonroe avatar dependabot-support avatar dopin avatar ember-tomster avatar jenweber avatar joshmcrty avatar localpcguy avatar locks avatar mansona avatar melsumner avatar ppcano avatar progand avatar pzuraq avatar robbiethewagner avatar samselikoff avatar sivakumar-kailasam avatar thorsteinsson avatar

Stargazers

 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

guides-app's Issues

Create a 404 route

Instructions for @rwwagner90

We need a catch all if a user enters an invalid route. For now, the 404 route should redirect to https://emberjs.com/404. Our deployment env requires that we have an in-app 404 route, and we can't just redirect to https://emberjs.com/404

docs

There's an ongoing project to convert shared website things (like headers, footers, etc) into components that can be reused, but in the meantime we copy/paste. The markup should match https://emberjs.com/404 and more or less match the style. Please put any css in a separate file from the rest of the css, so that when components are ready, we just swap it out.

Markup https://github.com/emberjs/website/blob/master/source/404.html.erb
Relevant css: maybe https://github.com/emberjs/website/blob/master/source/stylesheets/pages/404.css.scss

We still have some work to do on importing fonts/typography styling, so if it doesn't look exactly the same, it's ok. If you match the markup of the website, a subsequent PR will make things match.

Point "home" link in the main navigation to emberjs.com

Currently, the main link in the navbar is directing to the index page of the Guides app. In contrast the legacy Guides point to the emberjs.com project page:

Guides App Legacy Guides
guidesapp-home-link guidesapp-home-link-legacy

How to reproduce

Expected

To preserve the same behaviour as in the legacy Guides the "Home" navigation link should redirect to emberjs.com.

Test Stats:

Browser: Chrome Version 66.0
Domain: https://emberguides.stonecircle.io/

Remove patch versions & 'v' prefix in version dropdown

The patch version in version selector dropdown has been removed in the api docs so as to avoid confusion when patch releases are made on ember/ember-data. We also did away with the v prefix.

We instead used only majorVer.minorVer in dropdown and urls.(eg 3.1, 2.18) We also added route support to allow for old urls with patch versions in them to still resolve to the latest patch version of what was entered. e.g., https://emberjs.com/api/ember/3.1.10/modules/@ember%2Fapplication will still resolve to https://emberjs.com/api/ember/3.1/modules/@ember%2Fapplication.

This will give a sense of familiarity between using guides & api docs.

Quest: Bring the new Ember based guides-app home

This refactor of the guides app started as a Proof of Concept implementation of a "Just Ember" version of the Ember Guides and as a result of discussions on the community slack, I would like to thank everyone in #ember-learn for their patience in answering all my questions.

The main design of this system is that all of the source markdown files are located in https://github.com/ember-learn/guides-source, which is an npm dependency of this app. Those markdown files are compiled into JSON:API using https://github.com/stonecircle/broccoli-static-site-json and the custom adapter reads the static JSON files directly.

This quest issue it to keep track of all the little things that are required to complete the app so that it is ready to replace the current https://guides.emberjs.com site. This list will likely get a lot bigger before it starts to get smaller, but please clone the repo and test it all the feedback we can get is much appreciated.

If any of the following tasks need more explanation please let me know and I will elaborate on a new issue for that task. You can get help on the Ember Community Slack in the #-team-learning channel if you want to help out.

Blocker Tasks

Still to do

  • re-implement the search functionality (Issue: #6 Fixed in: #39)
  • add hover-over anchorable-toc "link" for headers (Fixed in: #49)
  • add "Old Guides" warning to older guides (Issue: #33 Fixed in: #48 )

Done

  • ensure guides-source is up to date and each version is in sync with the current guides site
  • make sure that removing the versioning ability of images doesn't cause problems for older guides (see #12 and ember-learn/guides-source#11)
  • make sure there is a newline between the end of the paragraph and the references of referential style links in guides-source. This causes an issue with the markdown renderer that breaks the link. Alternatively, this could be fixed upstream: https://www.npmjs.com/package/ember-cli-showdown
  • fix all cases where there is a newline between ancor and link because this breaks the link e.g. click [here]\n(https://emberjs.com
  • fix the anchorable-toc implementation for linking to headers throughout the guides
  • fix styles and display of code samples: either implement highlight in Javascript or finish the Prism configuration (see #7)
  • fix the indentation on /testing/acceptance for the ### Asynchronous Helpers list
  • make sure underscores are escaped properly so they aren't interpreted as italics markdown e.g. **node_modules / package.json** on /tutorial/ember-cli.md
  • prevent ... from being replaces with an ellipsis e.g. ...arguments on /object-model/classes-and-instances.md
  • fix the chapter links for the very last page i.e. on the /glossary/web-development page it shouldn't say "We've Finished Glossery ... "
  • get the table of contents dropdown working on mobile
  • upgrade the older versions (v1.10.0) guides.yml to follow the structure of the pages.yml so it will work with the new guides-app (see ember-learn/guides-source#10)
  • stop hard-coding the versions and have it consumable from the guides-source - also have 'current version' defined by data from the guides-source (see #9)
  • implement 'current' route
  • make sure titles are being added as meta-data (See #26)
  • fix titles on "index" pages (#27)

Release Tasks

Extra (nice to have) Tasks

Navigating to a non-existant route results in a blank screen

Repro:

  1. Navigate to: https://guides.emberjs.com/v1.12.0/nonsense/route/
  2. Note that the application doesn't render

Proposed solution:

  1. Navigate to: https://guides.emberjs.com/v1.12.0/nonsense/route/
  2. Be redirected to https://guides.emberjs.com/v1.12.0/
  3. Application renders

If the version also happens to be invalid, we can redirect to /release/ by default, this way at least the application renders something useful.

This is related, but not the same as: #132

Does this potential fix work or would the team prefer a 404, as in the other example?

use `release` instead of `current` in urls (but still support current)

To match API docs, we should use release in the urls to indicated the latest version. However we should still support current so we don't break untold numbers of bookmarks in everything.

To do

  • add release
  • write some tests

Wishlist for later PRs:

  • if you go to the latest version, it replaces the version # with release
  • need to start using release in the API docs and guides :x

Add meta titles to the guides app

@rwwagner90 I assigned this to you because you suggested it and you seemed to understand what is needed to be done 👍

The goal of this whole project is to make things functionally exactly the same and worry about any more general improvements after initial release

To that end we need titles to match current titles, I will point out some examples that may end up being edge cases but if we get these working I will be happy shipping for the initial release.

The general structure seems to be: Ember.js - <section title>: <page title> where:

  • section title: is the same as the section in the TOC
  • page title: is the same as the H1 at the top of the page

Examples:

Those last 2 might be a bit tricky because they play with the index implementation, and that has already caught me a few times at this stage 😖 #27

Tests don't run on Windows?

06:04:44.754 ember-console.js:43 DEBUG: -------------------------------
06:04:44.757 ember-console.js:43 DEBUG: Ember           : 3.1.2
06:04:44.757 ember-console.js:43 DEBUG: Ember Data      : 3.2.0
06:04:44.758 ember-console.js:43 DEBUG: jQuery          : 3.3.1
06:04:44.758 ember-console.js:43 DEBUG: Ember Bootstrap : 1.2.2
06:04:44.758 ember-console.js:43 DEBUG: -------------------------------
06:04:45.402 VM3880:4701 Uncaught TypeError: Cannot read property 'hasRegistration' of undefined
    at Class.isGlimmerTwo (<anonymous>:4701:41)
    at Class.init (<anonymous>:4511:16)
    at Class.superWrapper [as init] (ember-utils.js:428)
    at new Class (core_object.js:143)
    at Function._ClassMixinProps.create (core_object.js:297)
    at Class.startModule (<anonymous>:2306:29)
    at run (<anonymous>:2335:14)
    at Backburner._run (backburner.js:758)
    at Backburner.run (backburner.js:468)
    at run (ember-metal.js:408)

need fixtures

Fixtures are removed from the guides. I really need it. Otherwise could you please suggest some tutorial to use data from model (same as using fixtures)?

Nav bar links don’t auto-close nav bar on mobile

On the new site, when viewing via mobile and tapping a new link (under the nav header), I currently don’t get that “oh wow it’s fast” feeling @mansona was talking about. That’s due to the fact the nav box stays open on route change, leaving me wondering if anything had happened ...

Works great on other links at the bottom of each page though! 👍

Package.json engine tag appears to be incorrect

The current engine tag is:

  "engines": {
    "node": "^4.5 || 6.* || >= 7.*"
  },

Recommend we change it to >= 10.* as it's the new LTS and appears to work well.

No version of node lower than 8 will successfully run npm start.

node = v8.15.1 appears to work.

When running node 7.10.1, I get another error message:

  - stack: /Users/ed/Documents/guides-app/node_modules/algolia-html-extractor/lib/algoliaHtmlExtractor.js:17
      ...options,
      ^^^
SyntaxError: Unexpected token ...
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/ed/Documents/guides-app/node_modules/algolia-html-extractor/index.js:1:92)

When using node 6.17 and attempting to run ember serve I get the following error message:

  - stack: /Users/ed/Documents/guides-app/node_modules/ember-cli-deploy-prember-algolia/index.js:58
      upload: async function(context) {
                    ^^^^^^^^

SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at PackageInfo.getAddonConstructor (/Users/ed/Documents/guides-app/node_modules/ember-cli/lib/models/package-info-cache/package-info.js:380:18)

It's fair to assume that anything less than 6 also doesn't work from these error messages.

Hide / Fix links from deprecated sections of old version pages to the current version page

Current

Currently, there are sections (which can be found in older versions of the Guides but which have been deprecated in newer release versions) which contain a link to see the same section in the most recent version of the app. Some of these links are broken and clicking those elements will raise errors in the app. E.g.

Error while processing route: version.show Ember Data Request GET /content/v3.1.0/controllers/representing-a-single-model-with-objectcontroller/index.json returned a 404
Payload (Empty Content-Type)

See also e.g.:

Guides App Legacy Guides
guidesapp-legacy-to-new-link screen shot 2018-05-04 at 19 22 53

The Legacy Guides seem to circumvent this issue by not providing links which point to the corresponding chapter in the current Guides version on deprecated chapter pages.

How to reproduce

Expected

  • the link to the new Guides version does either not show up in the first place for sections that don't exist anymore in newer versions of the Guides or the link points to one of the parent chapters instead

Test Stats:

Browser: Chrome Version 66.0
Domain: https://emberguides.stonecircle.io/

Clarify the expected behaviour of the search on the guides page

I'm trying to clarify if we only want guides results when searching on https://guides.emberjs.com/

I seem to remember that there were some discussions that this is expected behaviour i.e. that you cannot search for API results when you're on the guides. I'm not saying it's the desired behaviour (I know we want to unify all of this) but I'm under the impression that we are expecting it to work this way right now.

Move the "Edit Page" button outside of the <H1> at the top of a page.

Please note: that we need to move the "Edit Page" link out of the Header in the markup but the location should not change. This will need some work on CSS too 👍

This is for both Accessibility (i have a feeling that it might be read out by a screen reader) and for the search index. Currently when you index the Guides every top-level title will have the words "edit page" in them 😖

image 2018-10-04 at 9 49 20 p m

Any plans to make guides-app multilingual?

Is multilingual support on the roadmap? The translations themselves are probably harder to pull off than the technical implementation, but I think it's a worthwhile long-term goal.

“View quick start guide” link from emberjs.com is broken

Probably related to #57.

On https://www.emberjs.com/, the “view quick start guide” link goes to https://guides.emberjs.com/current/getting-started/quick-start/ which is a 404; it should be https://guides.emberjs.com/release/getting-started/quick-start/ instead.

If the link was always broken, it should just be fixed; but presuming that it worked once upon a time, a redirect should be added so that /current/* goes to /release/*.

When the primary call to action from the home page is a broken link, a very bad impression is left!

Testing wishlist

(other maintainers are welcome to edit this directly)

  • recent-ish guides nav by previous-next links
  • cookbook nav by previous-next links
  • navigation by TOC
  • navigation by dropdown
  • current url works

Fix URL of the "Edit" Link on Index Page

Current

Currently the Edit on Github link on the index page doesn't link to the correct file on Github:

guidesapp-no-edit-link

How to reproduce:

Expected

  • if the user clicks the pencil icon in the upper right corner of the index page, they will be redirected to https://github.com/ember-learn/guides-source/edit/master/guides/v3.1.0/index.md

Test stats:

Browser: Safari Version 11.1
Domain: https://emberguides.stonecircle.io

Hide dropdown list of the Guides search if there is no search query

Current

Currently the dropdown list below the guides search is always shown, even if the search query is empty. See also in comparison to the UI of the legacy guides:

Guides App Legacy Guides
guidesapp-neverhidessearch guidesapp-hidesearch

|

How to reproduce:

Expected

The dropdown list below the search field is hidden once the search query is empty

Test stats:

Browser: Safari Version 11.1
Domain: https://ember-guides-prod.herokuapp.com/release/

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.