Commit Graph

8137 Commits

Author SHA1 Message Date
Pragati Agrawal 747e797092 stream settings: Disable Mobile notifications if push bouncer not set up.
This commit disables "Mobile notifications" if `push_notifications` are not
enabled. It also adds a tooltip explaining why this is disabled.

Fixes #12208
2019-06-24 14:46:45 -07:00
Yashashvi Dave 84234cabcb stream settings: Disable click handler on label for mute settings.
If stream setting is disabled, setting-checkbox can not be
clicked. Although, it does allow to change value by clicking
on setting label.
This commit fixes above bug and disable click handler on
setting-label for disabled stream settings.
2019-06-24 14:46:45 -07:00
Yashashvi Dave 02e82ef10c static/js/stream_events: Deduplicate notification settings updates. 2019-06-24 14:46:45 -07:00
Yashashvi Dave 5c88475378 static/js/stream_data: Deduplicate notification setting updates.
Commit also add `stream_data.js` to full test covered
enforced files for `test-js-with-node` tests.
2019-06-24 14:46:45 -07:00
Yashashvi Dave e0a78af494 static/js/stream_data: Extract function `receives_notifications`. 2019-06-24 14:46:45 -07:00
Yashashvi Dave 88f3325970 stream settings: Deduplicate stream settings click handlers. 2019-06-24 14:46:45 -07:00
Yashashvi Dave 1b9c1a7898 stream settings: Deduplicate template rendering. 2019-06-24 14:46:45 -07:00
Yashashvi Dave 30821dbcbb handlebars: Register `if_equal` handlebar helper.
`if_equal` execute conditional code if both
conditions are equal in templates.
2019-06-24 14:46:45 -07:00
Yashashvi Dave 1f5720d1b8 stream settings: Add `name` attr to settings elements.
Add `name` attribute to stream settings `input` elements
and change `id` attribute corresponding to name.
`name` attribute stores value of settings name which is
stored in frontend data sets.
2019-06-24 14:46:45 -07:00
Yashashvi Dave de1f4066ba stream settings: Change settings element-id to match with pattern.
Change element ids of `is_muted` and `pin_to_top` settings,
to macth with the pattern of other stream settings.

This is preparatory refactor to support removing code duplication in
the stream settings templates.
2019-06-24 14:46:22 -07:00
Yashashvi Dave 02e7655c4e display settings: Deduplicate display settings click handlers. 2019-06-24 14:41:53 -07:00
Yashashvi Dave 47f9cbf824 display settings: Deduplicate template rendering. 2019-06-24 14:41:53 -07:00
Yashashvi Dave c667e16a29 keyborad shortcuts: Document message formatting keyboard shortcuts.
Fixes #12246
2019-06-24 14:08:50 -07:00
Yashashvi Dave fed64cc59d static/js/common: Extract function `adjust_mac_shortcuts`. 2019-06-24 14:04:42 -07:00
Yashashvi Dave 251ed94bfc static/js/common: Use `platform` navigator to detect MacOS.
Replace `userAgent` navigator with `platform` navigator
to detect user's OS.
2019-06-24 14:04:42 -07:00
Yashashvi Dave 371343709b static/js/common: Extract function `has_mac_keyboard`. 2019-06-24 14:04:42 -07:00
YashRE42 50d43902fb narrows: Show invalid banner for invalid narrows.
Some search queries always return empty because of how we handle search,
this adds text that ensures users trying bad searches realize that they
are doing so.
2019-06-24 13:14:10 -07:00
YashRE42 02413f9a1b search: Show stopwords in multi-operator search.
Fixes #10592.
2019-06-24 13:08:08 -07:00
YashRE42 450e675b11 night-mode: Fix invite_user_form overlap bug.
Adding the element for the invite link would cause the modal footer to
shift upwards, in nightmode this caused the stream list to appear
beneath the footer as the footer background was transparent. This commit
replaces that styling with a solid equivalent color.
2019-06-24 13:00:49 -07:00
YashRE42 8fe86e5e24 tooltips: Fix alignment with keyboard-icon. 2019-06-24 12:57:52 -07:00
YashRE42 ae6e99ae34 tooltips: Fix doubling of keyboard-icon.
This fixes a bug where the default fade-in animation of bootstrap tool
tips caused the tool tip over the keyboard-icon to change shape slightly
while fading away.

Fixes #11766.
2019-06-24 12:57:48 -07:00
Shubham Padia 80a3651cf3 auth: Let user choose emails in GitHub auth.
Previously, our Github authentication backend just used the user's
primary email address associated with GitHub, which was a reasonable
default, but quite annoying for users who have several email addresses
associated with their GitHub account.

We fix this, by adding a new screen where users can select which of
their (verified) GitHub email addresses to use for authentication.

This is implemented using the "partial" feature of the
python-social-auth pipeline system.

Each email is displayed as a button. Clicking on that button chooses
the email. The email value is stored in a hidden input above the
button. The `primary_email` is displayed on top followed by
`verified_non_primary_emails`. Backend name is also passed as
`backend` to the template, which in our case is GitHub.

Fixes #9876.
2019-06-23 21:27:04 -07:00
Hemanth V. Alluri 720c866e06 devtools: Tweak the integrations tool to use http headers fixtures.
Now that we store HTTP headers in a way that is easy to retreive
by specifying the integration name and fixture name, we should
use it to pre-load the "Custom HTTP Headers" field in the
integrations dev panel.
2019-06-20 16:40:42 -07:00
Aman Agrawal 904422d8bc css: Convert colors from rgba to hsla format. 2019-06-20 11:34:59 -07:00
Aman Agrawal 3e589cf65e css: Convert colors from rgb to hsl format.
Note that we are not converting the stream colors.
2019-06-20 11:34:34 -07:00
Thomas Ip 549338dc50 refactor: Use variables for repeated colors in alerts.scss. 2019-06-20 11:20:29 -07:00
Thomas Ip 1fa82b9dea refactor: Extract display and animation properties from alert styling. 2019-06-20 11:20:29 -07:00
Yashashvi Dave 25dbda1e53 stream settings: Fix bug in deactivate stream modal appearance.
Stream deactivation modal should be append to main
unique id, stream overlay element.
This commit also add `new-style` class to modal.

Fixes #12394
2019-06-20 11:09:52 -07:00
Pragati Agrawal 5af8b980fe css: Remove redundant `#settings` from `zulip.scss`.
Since `settings` element no longer exists, hence removing it from
zulip.scss.
2019-06-18 10:09:23 -07:00
Pragati Agrawal 6105b05f50 css: Remove redundant `#organization` from `zulip.scss`.
This has been dead code since 1143ed7219.
2019-06-18 10:03:35 -07:00
Tim Abbott 09e57389ca Revert "settings_profile_fields: Refactor `read_field_data_from_form`."
This seems to have made our Casper tests fail.

This reverts commit e3237cdee2.
2019-06-17 16:35:57 -07:00
Yashashvi Dave e3237cdee2 settings_profile_fields: Refactor `read_field_data_from_form`.
This is important setup for supporting external account type fields.
2019-06-17 15:02:36 -07:00
Benjamin Melançon b633092ff1 settings: Fix linkifier settings page example.
The Linkifier settings page example crossed wires with GitHub commit
hashes and issue IDs.

Fixes #12591
2019-06-16 16:40:36 -07:00
Thomas Ip 0253ef12c6 popovers: Encode brackets in URI to avoid conflict with markdown links.
This fixes an issue where one could end up with a `(` in the markdown
syntax for a link after copy-pasting this, which doesn't work in
markdown.

Fixes #12579.
2019-06-16 15:18:33 -07:00
Hemanth V. Alluri 52a5474000 realm_plan_type: Restrict uploading organization logos by plan type.
Using the page_param variable "plan_includes_wide_organization_logo"
disallow users in a realm with a "LIMITED" plan type from uploading
their own wide organization logos and instead suggest that they
upgrade their plan using the page_param variable
"upgrade_text_for_wide_organization_logo" for the suggestion message.

Backend validation for this feature already exists.
2019-06-14 16:21:12 -07:00
Yashashvi Dave 981433d13c notification settings: Deduplicate template rendering. 2019-06-14 14:14:03 -07:00
Yashashvi Dave 31bb0439f9 notification settings: Reorder notification settings labels.
This is pre-refactoring commit for notification settings template
deduplication using a loop. This commit refactors notifications
section and reorder labels to match the ordering in the templates.
2019-06-14 14:13:29 -07:00
Yashashvi Dave 15cd238acb notification settings: Remove unused template argument.
This commit removes `propagate_stream_notifications_change`
element from notification template, as it is neglected
since commit b553507412.
Commit also removes `end_content` argument from
`settings_checkbox.handlebars` which was only used
for removed property.
2019-06-14 14:07:22 -07:00
Vishnu Ks 44d16d76c1 activity: Extract most js from realm_summary_table to activity.js. 2019-06-14 10:20:59 -07:00
Vishnu Ks 14e582fb59 support: Add functionality to copy admin emails.
Also renamed a bunch of functions in test_views for better
readability.
2019-06-14 10:19:50 -07:00
Alexandra Ciobica 5a4f7d9ade css: Align `Invite more users` button. 2019-06-14 09:59:59 -07:00
Thomas Ip da8473e958 draft: Fix draft list not being able to scoll to bottom.
Fixes #12552.
2019-06-13 11:35:14 -07:00
Alexandra Ciobica fbfd5d577a integrations: Move the css for the integrations page into a separate file.
The integrations page had css in both `landing-page.scss` and
`portico.scss`.  With this commit, the styles are mostly unified into
a single separate file.
2019-06-12 17:42:22 -07:00
Alexandra Ciobica ab02fb81c5 css: Remove unused portico css.
This *-page-header CSS all dates from a nearly-original version of the
portico design system, and hasn't been functional in years.
2019-06-12 17:41:50 -07:00
Alexandra Ciobica 13d78e9da7 integrations: Make header of integrations/docs on mobile look good.
Change the display from `block` to `flex` in order to be able to
arrange the elements as wanted. Reset the css of the header elements
only for the description view. Add `font-size: 1.2em` because the font
doesn't need resizing in this case, it needs resizing only when the
title is in the box.

Removed the `padding-bottom` from the `nav` on mobile because it
overlaps the new header and you cannot click the back button from the
integrations.

Fixes: #12365.
2019-06-12 17:33:53 -07:00
Alexandra Ciobica 869c5ce27b integrations: Change integrations content.
We remove the title from `errbot` integration documentation so that
all documentations have the same style.  See
https://github.com/zulip/python-zulip-api/pull/515 for a similar
change to integrations where the docs live elsewhere in version control.

We also remove the `margin: 0` from the instruction tip because where
the tip is followed by a list, there is no space between the two; this
change doesn't mess up the other places where the tip is used.
2019-06-12 17:33:00 -07:00
Vaibhav f3d0d955c3 css: Use SCSS nesting in lightbox.scss for `#lightbox_overlay`. 2019-06-12 17:07:41 -07:00
Vaibhav a7b820ddc3 css: Use SCSS nesting in lightbox.scss for `.image-actions`. 2019-06-12 17:07:41 -07:00
Vaibhav 7610c5f025 css: Cleanup lightbox.scss for download and open buttons.
* There is only one word inside the buttons and that too was wrapped
  inside `span.text` which was unnecessary. This is removed. All
  corresponding properties (font-size) are moved to `.button`.

* Since the only `a` inside image actions are these buttons, all
  the properties are transfered to `.button`.

* Similarly, properties for `.icon` are moved to `.button` and it is
  also removed from the template.
  * Font size was redundant for `.icon`
  * display property is moved
2019-06-12 17:07:41 -07:00
Vaibhav b97ba0b026 css: Remove redundant `span:nth-of-type(2)` rule from lightbox.scss.
Since no such element exists inside `.image-actions`.
2019-06-12 17:07:41 -07:00