Commit Graph

194 Commits

Author SHA1 Message Date
Shubham Padia f574790b09 left-sidebar: Add title attribute to `streamlist-toggle`.
The streamlist-toggle icon is visible for smaller screens and was
missing a title attribute.
2018-07-22 20:01:45 -07:00
Anders Kaseorg f75c0e29f4 HTML validation: Remove obsolete attributes from <script>, <style>.
<script charset=…>, <script type=…>, and <style type=…> are “obsolete
but conforming” in HTML5.  They make the validator.nu output noisier
and real problems a little harder to find.

(type was required in HTML 4, which is not relevant to us.)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-13 10:27:23 +05:30
Anders Kaseorg c28ab72124 HTML validation: Remove invalid attributes.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-13 10:27:23 +05:30
Anders Kaseorg ae55107560 HTML validation: Replace Drafts button with styled link.
<button> inside <a> is invalid.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-12 18:47:10 +05:30
Anders Kaseorg 05dc132fb2 HTML validation: Add placeholder text to <h1>, <h3>.
Otherwise validator.nu warns about the empty header tags.  The
placeholder text is replaced by JavaScript.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-12 18:46:31 +05:30
Aditya Bansal c47db1a1e8 left_sidebar.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:31:18 +05:30
Aditya Bansal fb839c1d5b compose.html: Upgrade to use font-awesome 4.7 icon prefixes.
We also adjust some CSS so that icons after this upgrade look exactly
or nearly the same as they did before the upgrade.
2018-07-11 20:31:17 +05:30
Aditya Bansal 44e9c6909f app/index.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 7b0de00715 right_sidebar.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 5552bfbeda settings_overlay.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal ccb4e11eb4 navbar.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Anders Kaseorg 162e3444d7 HTML validation: Fix <label for="…"> references.
These must refer to the id of an existing form control; id_username
doesn’t exist and streams_to_add isn’t a form control.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-09 10:00:56 +05:30
Anders Kaseorg 0d56aba4b5 HTML validation: Move topic_is_muted from head to body.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-09 10:00:56 +05:30
Anders Kaseorg 3806c092c6 HTML validation: Fix problems with tag nesting.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-09 10:00:56 +05:30
Anders Kaseorg 37dfa7f7d4 HTML validation: Remove xmlns:svg attribute.
xmlns:svg is an XML namespace declaration that would be valid in XHTML
but not in HTML.  Even in XHTML, it wouldn’t be necessary because we
don’t write SVG tags prefixed like <svg:circle>, only unprefixed like
<circle>.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-09 09:45:42 +05:30
Armaan Ahluwalia 54d3d8e8b3 webpack: Transition app.js to be compiled by webpack.
This commit moves all files previously under the 'app' bundle in
the Django pipeline to being compiled by webpack under the 'app'
entry point. In the process, it moves assets under the app entry
to a file called app.js that consumes all relevant css and js files.

This commit also edits the webpack config to be able to expose certain
variables for third party libraries that are currently required by
some modules. This is bad coding form and should be refactored to
requiring whatever dependencies a module may have; we're just
deferring that to the future to simplify the series of transitions we
need to do here. The variable exposure is done using expose-loader in
webpack.

The app/index.html template is edited to override the newly introduced
'commonjs' block in the base template. This is done as a temporary
measure so as not to disrupt other pages on the app during the transition.

It also fixes the value of the 'this' context that was being inferred
as window by third party libraries. This is done using imports-loader
in the webpack config.  This is also messy and probably isn't how we
want things to work long term.
2018-07-05 11:03:08 +02:00
Shubham Dhama 238c27eb71 settings: Fix focusing of `your-account` prior complete loading.
Fixes: #9686.
2018-06-27 11:20:54 -04:00
Eeshan Garg 0a43e5e257 Replace all user-facing references to "invite-only" with "private".
Fixes #9611.
2018-06-12 13:37:45 -04:00
Tim Abbott 93b5e0df61 custom profile fields: Extract a separate various for whether enabled.
This will make it possible to do this on a per-organization basis.
2018-06-07 11:35:04 -07:00
Anupam Dagar 8939767452 message view: Add loading indicator to bankruptcy modal.
Tweaked by tabbott to remove the old logic, which wasn't be displayed
and regardless didn't look as nice.

Fixes: #9629.
2018-06-06 15:06:05 -07:00
Steve Howell db514002ec settings: Use separate lists for the two sidebar panels.
The list with the options for normal settings now has
the class normal-settings-list.

The list with the options for org settings now has
the class org-settings-list.

The new markup helps us avoid code like this:

    $(".settings-list li:not(.admin)")

We also have funny hacks in our key handlers related
to the old combined-list approach, which we can
eventually eliminate.
2018-06-06 09:42:33 -07:00
Steve Howell 96caebf38f Remove dead code related to settings logout option.
I guess we used to have a way to logout from within
settings, but the list item was always hidden when you
went into settings, so it's apparently just dead code,
and it's kind of a strange thing to have in settings.
2018-06-04 09:02:58 -07:00
Anupam Dagar c8024cec5c hotkey: Close deprecation notice on Enter keypress. 2018-06-03 09:33:16 -07:00
Anupam Dagar 9674a139bf hotkeys: Change * to Ctr+s for starring a message.
Fixes: #9613.
2018-06-01 09:53:15 -07:00
Shubham Dhama d1bfb59872 home: Make `translations` load before `app` bundle. 2018-05-30 23:20:57 +05:30
Yashashvi Dave b94986b1e1 jquery-form: Remove use of jquery-form from invite-user form. 2018-05-30 03:14:39 +05:30
Shubham Padia d9b0ab2ae7 narrow: Show non-existing user message for invalid emails.
Also adds people.is_valid_bulk_emails_for_compose and refactors
narrow_state.set_compose_defaults to use it.
2018-05-28 10:45:42 -07:00
Yago González 5b0b9feb7d i18n: Atomize translation tags.
Makes the i18n strings in this file much easier to translate by splitting
them into smaller chunks (which avoids having a lot of code in the tagged
strings), and adds a string that was missing as well.
2018-05-26 07:06:43 -07:00
Shubham Padia 00cd622604 compose: Fix extra space below compose error text.
Fixes #9433.
Extra bottom margin was observed when using `compose_error` which
was caused by paragraphs in bootstrap having a bottom margin of 10px.
The paragraph tag has been replaced by a span tag.
2018-05-16 15:05:36 -07:00
Shubham Padia 9ad292cf2a right-sidebar: Add keyboard instructions shortcut in bottom-right corner.
Fixes #9182. Adds a link to the keyboard shortcuts popup at the
bottom-right corner of the right sidebar. A tooltip saying
`Keyboard Shortcuts(?)` has been added to the icon. The icon is
positioned using `position: fixed`.
2018-05-16 13:32:42 -07:00
Yago González bc403fc4c4 i18n: Tag missing strings for translation. 2018-05-15 09:06:56 -07:00
Tim Abbott 602b13db34 home: Make emojiset an explicit parameter.
This is cleaner than accessing the UserProfile object directly (we
don't really do that anywhere else).
2018-05-06 22:36:29 -07:00
Aastha Gupta 19806a0283 keyboard UI: Add Ctrl + k hotkey.
Fixes #8216
This commit binds the Ctrl + k to go to the search bar.
2018-05-06 19:19:00 -07:00
Armaan Ahluwalia 5f7b47e20c css: Transition 'app.css' to SCSS.
This commit transitions all styles in app.css in the Django pipeline
to being compiled by webpack in an app-styles bundle, and renames the
various files to now be processed as SCSS.

To implement this transition, we move the old CSS file refernces in
settings.py and replace them with a bundle declared in
`webpack.assets.json` and includedn in the index.html template

Tweaked by tabbott to keep the list of files in `app.css` in
`webpack.assets.json`, and to preserve the ordering from the old
`settings.py`.
2018-05-02 17:13:16 -07:00
Tim Abbott 77e57dd033 index.html: Clean up indentation and whitespace in HEAD.
This is mostly to make our linter happy after removing the conditional
in the previous commit.
2018-05-01 09:49:28 -07:00
Tim Abbott d92edb8ea5 css: Remove support for legacy desktop app.
We haven't seen significant traffic from the legacy desktop app in
over a year, and users using it get a warning to upgrade since last
summer, so it's probably OK to stop providing special fonts for it.
2018-05-01 09:49:28 -07:00
Rohitt Vashishtha 19b228bca4 sidebars: Disable autocomplete for user and stream search inputs.
Fixes #9269.
2018-05-01 09:24:40 -07:00
Yashashvi Dave 7bbe44d7a0 org settings: Remove "Delete streams" administrative tab from settings.
Fixes #9227
2018-04-30 17:47:34 +05:30
Tim Abbott 7d6bb3dcb4 settings: Remove obsolete default_desktop_notifications setting.
This actually hasn't been hooked up to do anything in years.

While we're at it, we remove the entire "Zulip Labs" settings page.
2018-04-28 13:46:07 -07:00
Aditya Bansal 8e38b8462b csp_nonce: Add nonce to webpack rendered js.
We use the attrs property provided by render_bundle function of
django-webpack-loader to add `nonce="<csp_nonce_val_here>" to
js scripts being rendered by webpack.
2018-04-24 06:13:21 +05:30
Aditya Bansal ae398dc48b csp_nonce: Add nonce to script tags loading minified JS. 2018-04-24 06:13:21 +05:30
Aditya Bansal 8c0a5c69f3 csp: Dynamically generate and add nonce to script tags. 2018-04-24 06:13:21 +05:30
Vishnu Ks 7533796ea9 popover: Add an option to show user profile.
Fixes #8880
2018-04-23 16:56:24 -07:00
Tim Abbott 1703e23980 templates: Move all core app templates into a subdirectory.
This should make it easier to find the templates that are actually
part of the core webapp, instead of having them all mixed together
with the portico pages.
2018-04-23 16:46:37 -07:00