Coder Social home page Coder Social logo

yacs-admin's People

Contributors

alfriadox avatar colegregory avatar kburk1997 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yacs-admin's Issues

Seed DB with yacs data on test branch

I'm assuming the database will be empty if we get rid of the ActiveResource models on the test branch. Ideally we should seed the DB from the YACS API first (or at least some of the data) so we have some data.

Show instructors on multiple lines

If a course has multiple instructors, they all show in an array-like object. Create a new line for each instructor instead for a more user-friendly view

Refactor tests

The cucumber tests seem to be very verbose since objects have a lot of fields.

Refactor the tests so that they have data tables as seen here.

Upgrade to Rails 5 or 4.2.8 and enfore Ruby 2.4.0

Rails 4.2.6 has some known vulnerabilities. Rails 4.2 is still supported but will probably reach end of life in the nearish future. It would be easier to upgrade to rails 5 sooner than later but its not a huge priority. Please do enforce ruby 2.4.0 in the Gemfile though.

Create Dockerfile

We need a Dockerfile for this. You don't have to use docker in development at this point but I want to be able to easily build and deploy it when we are ready.

Create testing branch with "dummy" ActiveRecord model

On master, we're using the actual YACS API. However, it would be nice if I had an admin panel for full CRUD before YACS API implements it for more seamless integration.

In order to do this, we need an ActiveRecord model for courses, sections, departments, and schools so that we do not need to rely on the YACS API. We could also test independently of the YACS API so that the actual YACS product isn't affected by an inevitable screwup on my end.

Of course, implementing this in the master would be really confusing, so I propose having a separate branch just for this.

Change icon to YACS icon

Right now, there is no icon configured for the app. Add the icon from the main YACS project and the YACS blog to make the UI more uniform.

Create instructors partial

The same snippet of code to get instructors on one line is used twice. This calls for another partial

Scenario: Search For a Course

Now that course table, show courses (with a few modifications to the show course page), and search courses homepage features all pass, create a scenario to search for a course.

Make navbar its own partial

In issue #33 , I will have the navbar highlight where the user is. This will be a lot easier if the navbar is a partial rather than hard-coded into the application view.

Lock table headers

There is a LOT of data in the API. Table headers need to be pinned to the top when scrolling

Create show view

Right now, only index view is supported for each model.

Create the show view.

In courses, this will show course description and all sections of the course.
In schools, this will show all departments in the school.
In departments, this will show all courses in the department.
In sections, this will link back to the course

Complete model-model relationships

In the YACS app, a school has many departments, which have many courses, which have many sections.

Sections belong to a course
Courses belong to a department
A department belongs to a school

Implement these relationships in the models themselves.

Allow user to add child in parent view

When a user is viewing an object, there should be a link to add a department to a school, a course to a department, a section to a course, a period to a section, etc.

Create custom get by id function

Right now, activeresource's GET format for an object with id <id> is:

.../courses/<id>.json

Yet YACS's format is:

/api/v5/courses.json?id=<id>

This makes the show view a lot more complicated than thought.

Create a custom function to get around this in the show function

Make partials for each object table

So far, each object table is repeated twice, and if we want to implement search, this will be three times. Move each table to its own partial for more DRY code.

Create form templates for each object

Before add and edit views are implemented, there should be a form for each object (school, department, course, section, period). This will avoid repeating code

Cucumber feature error - help me

When I go to the course page for 0                                       # features/step_definitions/webrat_steps.rb:10
  expected an attributes Hash, got ["id", "0"] (ArgumentError)
  ./app/controllers/course_controller.rb:19:in `show'
  ./features/step_definitions/webrat_steps.rb:12:in `/^I go to (.+)$/'
  features/manage_courses.feature:15:in `When I go to the course page for 0'
Then I should see "Physics"                                              # features/step_definitions/webrat_steps.rb:94

This is the error I get

Have navbar highlight active part of site

For example, if the user is viewing courses, "courses" should be highlighted.

The highlight should be red text on white background, contrasting with standard white text on red background

Label the issues

An issue for labeling issues. How meta.

Of course if I actually labeled issues this wouldn't be an issue.

Have search results appear as user is typing

Most search engines have this feature, making for a better UX. However, the current system does not. This might be a bit of a stretch seeing as this would require a massive amount of calls to the YACS API.

Add authentication

All CREATE/UPDATE/DESTROY operations in the YACS API will be secured with an API key. Ultimately, we would like a have a full user and login system not just for admins, but for students as well. In order to push the admin panel out faster, we may want to just give it a single API key (stored on the environment) and lock down the entire site with a single set of credentials using HTTP basic auth. The built in support for this would make this trivial to implement. We can then release the admin panel before the login system is complete, and switch to the true authentication system once it is complete.

TL;DR - For now we probably just want HTTP basic auth with credentials and api key stored in the environment.

We should get more of the basic functionality done before this is implemented, though.

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.