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

Modified topic viewer page and few UI changes on topic editor page. #6455

Merged
merged 51 commits into from
Apr 19, 2019
Merged
Changes from 6 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f115e45
First
Nov 26, 2018
28b6e0e
First
Nov 26, 2018
c429cae
Second
Nov 27, 2018
83f6a9c
Third
Nov 27, 2018
9cac86f
Fourth
Nov 27, 2018
010e82c
Merge branch 'develop' of https://github.com/anubhavsinha98/oppia int…
anubhavsinha98 Jan 31, 2019
ed6db59
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 11, 2019
cd0f299
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 17, 2019
a3c44a4
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 18, 2019
7276cb1
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 19, 2019
e04ff0e
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 22, 2019
f566c57
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 25, 2019
4913821
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 25, 2019
b017a2b
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 26, 2019
53f68cd
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 27, 2019
892949a
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Feb 28, 2019
4aa5e63
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 1, 2019
0283d75
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 1, 2019
e595522
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 2, 2019
21d6944
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 3, 2019
46e2322
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 4, 2019
3cc076e
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 5, 2019
d4df339
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 6, 2019
a84476e
Reset
anubhavsinha98 Mar 6, 2019
1bce319
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 7, 2019
9c75ed5
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 9, 2019
4448fdb
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 10, 2019
31758f9
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 12, 2019
4ec472a
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 12, 2019
9826745
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 12, 2019
03e46a8
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 13, 2019
73fc74a
Added 4 tiles & fixed tab issues
anubhavsinha98 Mar 14, 2019
458e0ba
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 14, 2019
3db14a6
Maded some changes
anubhavsinha98 Mar 14, 2019
3bcf798
Linting Fixed
anubhavsinha98 Mar 14, 2019
7f4b7e8
Lint fixed
anubhavsinha98 Mar 14, 2019
47b7b7b
Updated constant.js
anubhavsinha98 Mar 14, 2019
a96fb6f
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 15, 2019
5ae7186
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 16, 2019
b7dec02
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 17, 2019
5d322f3
Merge branch 'develop' of https://github.com/oppia/oppia into develop
anubhavsinha98 Mar 22, 2019
38e29e7
Merge branch 'develop' into mock
anubhavsinha98 Mar 24, 2019
b4e5374
Merge branch 'mock' of https://github.com/anubhavsinha98/oppia into mock
anubhavsinha98 Mar 24, 2019
a54d5c4
reverted changes
anubhavsinha98 Mar 24, 2019
645574d
Tab fixed
anubhavsinha98 Mar 24, 2019
ef2160b
Update constants.js
anubhavsinha98 Mar 24, 2019
9a8e45d
Update topic_editor_navbar_directive.html
anubhavsinha98 Mar 24, 2019
9918305
Mobile view corrected
anubhavsinha98 Apr 11, 2019
2c00741
Merge branch 'mock' of https://github.com/anubhavsinha98/oppia into mock
anubhavsinha98 Apr 11, 2019
dee5636
linting issues fixed
anubhavsinha98 Apr 11, 2019
ef01166
Added mobile view tab section
anubhavsinha98 Apr 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 75 additions & 3 deletions scripts/pre_commit_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,76 @@ def _check_docstrings(all_files):
return summary_messages


def _check_args_order(all_files):
"""If class args like self and cls are there
in function then it come first.
"""
print 'Starting arguments order check'
print '----------------------------------------'
wrong_ordself_message = ('The first arg of the function should be self')
wrong_ordcls_message = ('The first arg of the function should be cls')
summary_messages = []
files_to_check = [
filename for filename in all_files if not
any(fnmatch.fnmatch(filename, pattern) for pattern in EXCLUDED_PATHS)
and filename.endswith('.py')]
failed = False
for filename in files_to_check:
with open(filename, 'r') as f:
file_content = f.readlines()
file_length = len(file_content)
for line_num in range(file_length):
line = file_content[line_num].lstrip().rstrip()
if line[0:3] == 'def ':
START = '('
END = ')'
# Find index of '('.
while 1:
try:
start_index = line.index(START)
break
except ValueError:
line_num = line_num + 1
line = file_content[line_num].lstrip().rstrip()
# Find index of ')'.
while 1:
try:
end_index = line.index(END)
break
except ValueError:
line_num = line_num + 1
line = file_content[line_num].lstrip().rstrip()
if start_index + 1 != end_index:
# Getting the list of all the arguments.
args_list = line[start_index + 1:end_index].split(',')
if 'self' in args_list:
if args_list[0] != 'self':
failed = True
print '%s --> Line %s: %s' % (
filename, line_num + 1,
wrong_ordself_message)
elif 'cls' in args_list:
if args_list[0] != 'cls':
failed = True
print '%s --> Line %s: %s' % (
filename, line_num + 1,
wrong_ordcls_message)
print ''
print '----------------------------------------'
print ''
if failed:
summary_message = (
'%s Arguments order check failed' % _MESSAGE_TYPE_FAILED)
print summary_message
summary_messages.append(summary_message)
else:
summary_message = (
'%s Arguments order check passed' % _MESSAGE_TYPE_SUCCESS)
print summary_message
summary_messages.append(summary_message)
return summary_messages


def _check_html_directive_name(all_files):
"""This function checks that all HTML directives end
with _directive.html.
Expand Down Expand Up @@ -1743,6 +1813,7 @@ def main():
import_order_messages = _check_import_order(all_files)
newline_messages = _check_newline_character(all_files)
docstring_messages = _check_docstrings(all_files)
args_order_messages = _check_args_order(all_files)
comment_messages = _check_comments(all_files)
# The html tags and attributes check has an additional
# debug mode which when enabled prints the tag_stack for each file.
Expand All @@ -1754,9 +1825,10 @@ def main():
all_messages = (
directive_scope_messages + controller_dependency_messages +
html_directive_name_messages + import_order_messages +
newline_messages + docstring_messages + comment_messages +
html_tag_and_attribute_messages + html_linter_messages +
linter_messages + pattern_messages + copyright_notice_messages)
newline_messages + docstring_messages + args_order_messages +
comment_messages + html_tag_and_attribute_messages +
html_linter_messages + linter_messages + pattern_messages +
copyright_notice_messages)
if any([message.startswith(_MESSAGE_TYPE_FAILED) for message in
all_messages]):
sys.exit(1)
Expand Down