Remove GLOBALS from base.html
See original GitHub issueExplanation
We use GLOBALS for transferring dynamic variables between backend and frontend. Since we plan to move to static serving for our pages we need to get rid of GLOBALS.
GLOBALS consist of two types of variables: constants and dynamic variables. We should first get rid of the constants, there are three cases regarding constants:
- the constant is used both in frontend and backend
- we should move it from GLOBALS to /assets/constants.js or keep the constant in feconf.py and make an AJAX request to retrieve the constant to the frontend.
- the constant is used just in the backend
- we need to remove it from GLOBALS
- the constant is used just in the frontend
- we should move it from GLOBALS to core/templates/dev/head/app.js as
oppia.constant()
- we should move it from GLOBALS to core/templates/dev/head/app.js as
The variables in GLOBALS can be handled in many different ways. For reference: #5191 #5290 #5397 #5618
If you’d like to help with this issue, please select a file from the list below, put your name in parentheses next to it, and submit a PR after getting rid of the variable from GLOBALS in that file. Once the PR is submitted, you can tick the checkboxes.
Remaining GLOBALS
- ADDITIONAL_ANGULAR_MODULES (it’s used in interactions) @Jamesjay4199
- csrf_token
- status_code
- GCS_RESOURCE_BUCKET_NAME (app identity) @Jamesjay4199
- iframed @Jamesjay4199
- isTopicManager
- userIsLoggedIn @vrajesh978
- check for the presence of App Engine authentification cookies
- login/logout
- loginUrl
- logoutUrl @abhaygupta97 (removed from codebase)
- SITE_FEEDBACK_FORM_URL @Jamesjay4199
- promo bar @abhaygupta97
- PROMO_BAR_IS_ENABLED
- PROMO_BAR_MESSAGE
- Create backend handler for promobar message. Retrieve promobar message on frontend by AJAX. Move feconf.ENABLE_PROMO_BAR to constants.
- allowYamlFileUpload (deprecated – remove and move the functionality to admin Activities tab)
- NAV_MODE
- Used for side navigation bar, can be removed and handled in frontend.
- user related @vojtechjelinek
- isAdmin
- isModerator
- isSuperAdmin
- can_create_collections
- username
- preferredSiteLanguageCode
Issue Analytics
- State:
- Created 5 years ago
- Comments:60 (53 by maintainers)
Top Results From Across the Web
Django global variable for base.html
I'm not really sure if its implemented the right way. I don't know how to access the global var. in Template. In the...
Read more >Remove global.css from public and move it into app source ...
I suggest this to be done in the template too, global.css removed ... But it's just for base styles, which apply to the...
Read more >R: Remove Objects from a Specified Environment
remove and rm can be used to remove objects. These can be specified successively as character strings, or in the character vector list...
Read more >Adding or Removing Global Variables Using the CCE
In the CCE for a given resource, click the +/-Global Variable button . · On the Global Variable Selector dialog, click to de-select...
Read more >Global attributes - HTML: HyperText Markup Language | MDN
Chrome Edge
accesskey Full support. ChromeYes. Toggle history Full support. Edge12. Tog...
autocapitalize Full support. Chrome43. Toggle history Full support. Edge79. Tog...
autocomplete Full support. ChromeYes....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a lot! @YashJipkate
Hi @Jamesjay4199,
iframed
has been assigned to you. Go ahead! Thanks.