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

Remove prototype from app/views/shared #598

Open
emilywatkins opened this issue Sep 7, 2018 · 5 comments
Open

Remove prototype from app/views/shared #598

emilywatkins opened this issue Sep 7, 2018 · 5 comments

Comments

@emilywatkins
Copy link
Contributor

Ref #457

  • app/views/shared/_accordion_nav.html.haml:34 #sortable_element

  • app/views/shared/_accordion_nav.html.haml:35 #sortable_element

  • app/views/shared/_activity_trail.html.haml:27 #link_to_function

  • app/views/shared/_general_accordion_nav.html.haml:62 #sortable_element

  • app/views/shared/_general_accordion_nav.html.haml:64 #sortable_element

  • app/views/shared/_offering_for_teacher.html.haml:26 #sortable_element

  • app/views/shared/_page_header.html.haml:4 #link_to_remote
    uses CALLBACKS and AJAX_OPTIONS

  • app/views/shared/_runnable.html.haml:12 #draggable_element

  • app/views/shared/_runnables_listing.html.haml:36 #draggable_element

@scytacki
Copy link
Member

general_accordion_nav can be removed:
It is used here:

= render :partial => 'shared/general_accordion_nav', :locals => {:top_node => @investigation, :selects => [@investigation,@activity,@section,@page]}
- elsif @activity
= render :partial => 'shared/general_accordion_nav', :locals => {:top_node => @activity, :selects => [@activity,@section,@page]}
- elsif @portal_school
= render :partial => 'shared/general_accordion_nav', :locals => {:top_node => @portal_school, :selects => [@school,@teacher,@portal_clazz,@portal_student]}
- elsif @portal_teacher && (@portal_teacher.user == current_visitor)

In those 3 cases it not necessary anymore. It is OK in those cases to fall through to the 'portal_teacher' and 'portal_student' cases.

@scytacki
Copy link
Member

scytacki commented Sep 10, 2018

It looks like accordion_nav, and activity_trail are not used anywhere.

I'm pretty sure the sortable_element part of offering_for_teacher can be removed. I believe this partial is only rendered on an admin page here: /portal/classes/[id]
It would be useful to make a list of top level pages where offering_for_teacher rendered.

@scytacki
Copy link
Member

page_header is not used.

It also looks like _runnable.html.haml is also only used in one place that isn't available anymore: ClazzesController#remove_offering.

@scytacki
Copy link
Member

I suspect runnables_listing can be removed or simplified. The UI that teachers use to reorder offerings in their classes has been moved to portal-pages. It would be helpful to trace through this one as well. For example it seems like it is used by ClazzesController#edit_offerings, which has a member route defined. However when I request the page on the staging server I get at 'page does not exist' response. The URL I tried was: https://learn.staging.concord.org/portal/classes/1/edit_offerings

@scytacki
Copy link
Member

To summarize I believe all these partials and views can either be removed, or their dynamic (sortable draggable) elements can be removed. I'll mark it as dead for that reason.

@scytacki scytacki added the dead label Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants