Skip to content

Commit

Permalink
Complete some miscellaneous small fixes -- drop UA tag, add comments …
Browse files Browse the repository at this point in the history
…and update issue templates. (oppia#18553)

* Misc small fixes -- update Android page, add comments and update issue templates, drop UA tag.

* Drop changes for updating Android page description.
  • Loading branch information
seanlip authored Jun 30, 2023
1 parent 8cb679d commit e3d0f66
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 61 deletions.
12 changes: 2 additions & 10 deletions .github/ISSUE_TEMPLATE/1_bug_report_form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,8 @@ body:
label: Tips for developers
description: Please leave this section as-is.
value: |
Before tackling the bug, please use `git bisect` (see https://git-scm.com/docs/git-bisect)
to investigate which PR caused it (you only need to go back as far as
commit https://github.com/oppia/oppia/commits/9a334e9).
If you find the PR, leave a comment on this issue pointing to it, or
just say that it happened before commit 9a334e9 if you could reproduce
it there. This will help us fix the issue by reverting the faulty PR.
Before tackling the bug, please use `git bisect` (see https://git-scm.com/docs/git-bisect) to investigate which PR caused it (you only need to go back as far as commit https://github.com/oppia/oppia/commits/9a334e9). If you find the PR, leave a comment on this issue pointing to it, or just say that it happened before commit 9a334e9 if you could reproduce it there. This will help us fix the issue by reverting the faulty PR.
Also, if this is your first issue, please make sure to follow
https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#choosing-a-good-first-issue
and https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up
before claiming it. Thanks!
Also, if this is your first issue, please make sure to follow https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#choosing-a-good-first-issue and https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up before claiming it. Thanks!
validations:
required: true
6 changes: 3 additions & 3 deletions .github/PENDING_REVIEW_NOTIFICATION_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Hi {{ username }},

It looks like you haven't reviewed the following Oppia-web PRs within the expected time:
It looks like you're assigned to this PR, but haven't taken any action for at least 2 days:
{{ pr_list }}

Could you please review the pending PRs as soon as possible? Note that a full list of PRs assigned to you on Oppia-web can be found at [this link](https://github.com/oppia/oppia/pulls/assigned/{{ username }}).
Please review the pending PRs as soon as possible, and reply to this thread once all the PRs are reviewed.

Please make sure to reply to this thread once all the PRs are reviewed!
To avoid these messages in the future, please bookmark [this link](https://github.com/pulls/assigned) and check it daily. Thanks!
7 changes: 4 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ provide the videos/screenshots of developer-facing interface.
Please also include videos/screenshots of the developer tools
browser console, so that we can be sure that there are no console errors.
If the changes in your PRs are autogenerated via a script and you cannot provide proof
for the changes then please leave a comment "No proof of changes needed because {{Reason}}"
and remove all the sections below.
The above should be done for all PRs, including short ones (e.g. a single-line change).
However, if the changes in your PRs are autogenerated via a script and you cannot
provide proof for the changes then please leave a comment "No proof of changes
needed because {{Reason}}" and remove all the sections below.
-->

#### Proof of changes on desktop with slow/throttled network
Expand Down
6 changes: 5 additions & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Oppia is an online learning tool that enables anyone to easily create and share

In addition to developing the Oppia platform, the team is also developing and piloting a set of free and effective [lessons](https://www.oppia.org/fractions) on basic mathematics. These lessons are targeted at learners who lack access to educational resources.

Oppia is written using Python and AngularJS, and is built on top of Google App Engine.
Oppia is written using Python and AngularJS, and is built on top of Google App Engine. See also:

* [Oppia.org community site](https://www.oppia.org)
* [User Documentation](https://oppia.github.io/)
Expand All @@ -13,6 +13,8 @@ Oppia is written using Python and AngularJS, and is built on top of Google App E
* [Developer announcements](http://groups.google.com/group/oppia-dev)
* [File an issue](https://github.com/oppia/oppia/issues/new/choose)

You can also sign up to our [email newsletter](https://shorturl.at/CHPY6) for news and updates about the overall Oppia project.

<p align="center">
<a href="http://www.youtube.com/watch?v=Ntcw0H0hwPU" target="_blank" rel="noopener">
<img src="https://user-images.githubusercontent.com/30050862/228266651-1270bedc-658a-40d8-8ab4-16b63de4deaf.png">
Expand All @@ -31,6 +33,8 @@ You can help with Oppia's development in many ways, including art, coding, desig
* **Developers**: please see [this wiki page](https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up) for instructions on how to set things up and commit changes.
* **All other contributors**: please see our [general contributor guidelines](https://github.com/oppia/oppia/wiki).

If you'd like to donate to support our work, you can do so [here](https://www.oppia.org/donate).


## Support

Expand Down
1 change: 0 additions & 1 deletion assets/analytics-constants.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"CAN_SEND_ANALYTICS_EVENTS": false,
"GA_ANALYTICS_ID": "",
"UA_ANALYTICS_ID": "",
"SITE_NAME_FOR_ANALYTICS": ""
}
2 changes: 2 additions & 0 deletions core/storage/blog/gae_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class BlogPostModel(base_models.BaseModel):
"""Model to store blog post data. Functionality to allow authors to revert
back to earlier versions is not being built in as we do not want to maintain
commit history for blog post models. All models are therefore not versioned.
Note that blog post authors can always make edits directly to their post,
and re-publish it.
The id of instances of this class is in the form of random hash of 12 chars.
"""
Expand Down
5 changes: 0 additions & 5 deletions core/templates/google-analytics.initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function initializeGoogleAnalytics() {

if (
analyticsConstants.GA_ANALYTICS_ID &&
analyticsConstants.UA_ANALYTICS_ID &&
analyticsConstants.SITE_NAME_FOR_ANALYTICS
) {
// Reference doc:
Expand All @@ -47,9 +46,5 @@ export function initializeGoogleAnalytics() {
'anonymize_ip': true,
'forceSSL': true,
});
gtag('config', analyticsConstants.UA_ANALYTICS_ID, {
'anonymize_ip': true,
'forceSSL': true,
});
}
}
1 change: 0 additions & 1 deletion core/templates/pages/header_js_libs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
query parameters to download them.
-->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= GA_ANALYTICS_ID %>"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= UA_ANALYTICS_ID %>"></script>
<% } %>
<!-- This code is used for inserting webpack bundles
https://github.com/jantimon/html-webpack-plugin#writing-your-own-templates -->
Expand Down
12 changes: 0 additions & 12 deletions scripts/release_scripts/update_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def update_analytics_constants_based_on_config(
Raises:
Exception. No GA_ANALYTICS_ID key found.
Exception. No UA_ANALYTICS_ID key found.
Exception. No SITE_NAME_FOR_ANALYTICS key found.
Exception. No CAN_SEND_ANALYTICS_EVENTS key found.
"""
Expand All @@ -202,13 +201,6 @@ def update_analytics_constants_based_on_config(
'Error: No GA_ANALYTICS_ID key found.'
)
ga_analytics_id = ga_analytics_searched_key.group(1)
ua_analytics_searched_key = re.search(
r'"UA_ANALYTICS_ID": "(.*)"', config_file_contents)
if ua_analytics_searched_key is None:
raise Exception(
'Error: No UA_ANALYTICS_ID key found.'
)
ua_analytics_id = ua_analytics_searched_key.group(1)
site_name_for_analytics_searched_key = re.search(
r'"SITE_NAME_FOR_ANALYTICS": "(.*)"', config_file_contents)
if site_name_for_analytics_searched_key is None:
Expand All @@ -228,10 +220,6 @@ def update_analytics_constants_based_on_config(
release_analytics_constants_path,
'"GA_ANALYTICS_ID": ""',
'"GA_ANALYTICS_ID": "%s"' % ga_analytics_id)
common.inplace_replace_file(
release_analytics_constants_path,
'"UA_ANALYTICS_ID": ""',
'"UA_ANALYTICS_ID": "%s"' % ua_analytics_id)
common.inplace_replace_file(
release_analytics_constants_path,
'"SITE_NAME_FOR_ANALYTICS": ""',
Expand Down
24 changes: 0 additions & 24 deletions scripts/release_scripts/update_configs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,20 +373,17 @@ def test_update_analytics_ids(self) -> None:
tempfile.NamedTemporaryFile().name
)
constants_text = (
' "UA_ANALYTICS_ID": "456"\n'
' "GA_ANALYTICS_ID": "123"\n'
' "SITE_NAME_FOR_ANALYTICS": "site-name"\n'
' "CAN_SEND_ANALYTICS_EVENTS": true\n'
)
analytics_constants_config_text = (
' "GA_ANALYTICS_ID": ""\n'
' "UA_ANALYTICS_ID": ""\n'
' "SITE_NAME_FOR_ANALYTICS": ""\n'
' "CAN_SEND_ANALYTICS_EVENTS": false\n'
)
expected_analytics_constants_config_text = (
' "GA_ANALYTICS_ID": "123"\n'
' "UA_ANALYTICS_ID": "456"\n'
' "SITE_NAME_FOR_ANALYTICS": "site-name"\n'
' "CAN_SEND_ANALYTICS_EVENTS": true\n'
)
Expand All @@ -409,33 +406,14 @@ def test_raises_error_with_invalid_update_analytics_ids(self) -> None:
)
analytics_constants_config_text = (
' "GA_ANALYTICS_ID": ""\n'
' "UA_ANALYTICS_ID": ""\n'
' "SITE_NAME_FOR_ANALYTICS": ""\n'
' "CAN_SEND_ANALYTICS_EVENTS": false\n'
)
with utils.open_file(temp_analytics_constants_config_path, 'w') as f:
f.write(analytics_constants_config_text)

# Testing invalid UA_ANALYTICS_ID key.
constants_text = (
' "UA_analytics_ID": "456"\n'
' "GA_ANALYTICS_ID": "123"\n'
' "SITE_NAME_FOR_ANALYTICS": "site-name"\n'
' "CAN_SEND_ANALYTICS_EVENTS": true\n'
)
with utils.open_file(temp_constants_path, 'w') as f:
f.write(constants_text)
with self.assertRaisesRegex(
Exception, 'Error: No UA_ANALYTICS_ID key found.'
):
update_configs.update_analytics_constants_based_on_config(
temp_analytics_constants_config_path,
temp_constants_path
)

# Testing invalid GA_ANALYTICS_ID key.
constants_text = (
' "UA_ANALYTICS_ID": "456"\n'
' "GA_analytics_ID": "123"\n'
' "SITE_NAME_FOR_ANALYTICS": "site-name"\n'
' "CAN_SEND_ANALYTICS_EVENTS": true\n'
Expand All @@ -452,7 +430,6 @@ def test_raises_error_with_invalid_update_analytics_ids(self) -> None:

# Testing invalid SITE_NAME_FOR_ANALYTICS key.
constants_text = (
' "UA_ANALYTICS_ID": "456"\n'
' "GA_ANALYTICS_ID": "123"\n'
' "SITE_name_for_ANALYTICS": "site-name"\n'
' "CAN_SEND_ANALYTICS_EVENTS": true\n'
Expand All @@ -469,7 +446,6 @@ def test_raises_error_with_invalid_update_analytics_ids(self) -> None:

# Testing invalid CAN_SEND_ANALYTICS_EVENTS key.
constants_text = (
' "UA_ANALYTICS_ID": "456"\n'
' "GA_ANALYTICS_ID": "123"\n'
' "SITE_NAME_FOR_ANALYTICS": "site-name"\n'
' "can_SEND_analytics_EVENTS": true\n'
Expand Down
1 change: 0 additions & 1 deletion webpack.prod.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ module.exports = merge(common, {
// See https://webpack.js.org/plugins/define-plugin/
new webpack.DefinePlugin({
GA_ANALYTICS_ID: JSON.stringify(analyticsConstants.GA_ANALYTICS_ID),
UA_ANALYTICS_ID: JSON.stringify(analyticsConstants.UA_ANALYTICS_ID),
SITE_NAME_FOR_ANALYTICS: JSON.stringify(
analyticsConstants.SITE_NAME_FOR_ANALYTICS
),
Expand Down

0 comments on commit e3d0f66

Please sign in to comment.