canvas-lms/gems
Eric Saupe 3ff97df0e9 Modify index and show views for K5 mode
This change removes the sidebar and breadcrumbs from show and index
actions in course controllers to simplify the views.

fixes LS-2063
flag=canvas_for_elementary

test plan:
- Enable Canvas for Elementary for the account
- Navigate to the course settings page
- Navigate to all pages listed in the left nav
- Verify the left nav and breadcrumbs are missing on all course pages for
 students but not for teachers

Change-Id: Id8e448ee2b3bd981f4376de5cf827d728da15763
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-04-21 18:21:41 +00:00
..
activesupport-suspend_callbacks add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
acts_as_list add an `ordered` scope to acts_as_list, and use it 2021-03-31 21:48:10 +00:00
adheres_to_policy add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
attachment_fu add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
autoextend add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
bookmarked_collection add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
broadcast_policy add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_breach_mitigation add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_cache add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_cassandra add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_color add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_crummy Modify index and show views for K5 mode 2021-04-21 18:21:41 +00:00
canvas_dynamodb add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_errors add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_ext add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_http CanvasHttp: support for a max response body length 2021-04-19 17:40:03 +00:00
canvas_i18nliner rename some things 2021-04-06 01:12:49 +00:00
canvas_kaltura add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_mimetype_fu add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_panda_pub add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_partman add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_quiz_statistics add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_sanitize Strip ridiculous css values MathJax might have added 2021-04-14 21:19:29 +00:00
canvas_security add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_slug add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_sort add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_stringex add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_text_helper add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_time add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
canvas_unzip add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
config_file add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
csv_diff add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
diigo add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
dr_diff add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
dynamic_settings add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
event_stream add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
google_drive add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
html_text_helper add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
i18n_extraction add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
i18n_tasks rename some things 2021-04-06 01:12:49 +00:00
incoming_mail_processor add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
json_token add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
linked_in add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
live_events add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
lti-advantage add migration claim to LTI 1.3 launches 2021-04-14 19:34:24 +00:00
lti_outbound add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
multipart add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
paginated_collection add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
plugins add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
request_context add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
rubocop-canvas add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
stringify_ids add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
tatl_tael add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
turnitin_api add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
twitter add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
utf8_cleaner add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
workflow add frozen_string_literal comment to engines and gems 2021-03-30 18:14:15 +00:00
README.md extract ConfigFile to gem 2021-02-23 21:18:20 +00:00
test_all_gems.sh Alpine canvas-lms based image 2020-07-15 17:21:56 +00:00

README.md

Gems

This folder is a place to extract modular functionality from canvas. Canvas's Gemfile arrangement is enabled to read gems from this path locally without installing from a remote source. This is valuable for a few reasons:

  • it prevents circular dependencies (bundler won't allow it)
  • modularized code cannot bind to specific domain concepts on canvas models
  • gems can have their specs run independently, without needing to load all of canvas, saving iteration time
  • it allows for eventual build optimization via only running specs for the transitive closure of parents depending on a gem where a change is.
  • it gives ENGINES extracted from canvas (see the "engines" directory) a place to reference code shared with canvas without it being packaged into the canvas monolith directly.

There are some tradeoffs:

  • spreads canvas over more subdirectories, giving some mental overhad to traversing the entire codebase.
  • modular tests necessarily don't test integration with canvas concepts, so solid integration tests in the app are still a requirement.
  • total SERIALIZED build time goes up because each gem loads it's specs in a new process rather than all running within an already booted canvas process.

[TODO] eventually write more on whether we feel like those tradeoffs are good ones, and what the best practices are to leverage this pattern for max-gain/min-pain.

Testing

To test all the gems:

cd gems
./test_all_gems.sh

To test an individual gem

Run ./test.sh inside the gem's folder. This is basically the same as:

cd gems/google_drive
bundle
rspec