Commit Graph

8116 Commits

Author SHA1 Message Date
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
Vaibhav
288a0c241c css: Reorder lightbox.scss so that .image-actions are in same place. 2019-06-12 17:07:41 -07:00
Vaibhav
96fecdd7d5 css: Use SCSS nesting in lightbox.scss for .button. 2019-06-12 17:07:41 -07:00
Vaibhav
ede9faef2e css: Remove redundant .download top positioning in lightbox.scss.
* This rule was already invalid since `.download` is used in
  templates as `.button.download` and here it was defined as
  `.button .download`

* Even if the above was to be corrected, `.download` has position
  `static` and hence the top positioning would never have affected
  anything.
2019-06-12 17:07:41 -07:00
Vaibhav
3641855a2c css: Change rule from a.button to .button in lightbox.scss.
This works since the buttons in lightbox overlay are `a`s. Even if
they weren't so, this style can generally be applied to all the
`.button`s.
2019-06-12 17:07:41 -07:00
Vaibhav
351b3e9332 css: Remove redundant .clear-float since already defined in app_components. 2019-06-12 17:07:41 -07:00
Vaibhav
b75b6ce64c css: Use SCSS nesting in lightbox.scss for .center. 2019-06-12 17:07:41 -07:00
Vaibhav
a1f2b2b5ba css: Nest .image-list .image.selected inside .center. 2019-06-12 17:07:41 -07:00
Vaibhav
7b059fe8bf css: Use SCSS nesting in lightbox.scss for .player-container. 2019-06-12 17:07:41 -07:00
Vaibhav
414358e0a0 css: Use SCSS nesting in lightbox.scss for .image-description. 2019-06-12 17:07:41 -07:00
Vaibhav
a64aac4299 css: Reorder lightbox.scss so .image-descriptio are in same place. 2019-06-12 17:07:41 -07:00
Vaibhav
8ab4d38b6e css: Use SCSS nesting in lightbox.scss for .image-preview. 2019-06-12 17:07:41 -07:00
Vaibhav
249416e94a css: Use SCSS nesting in lightbox.scss for media queries. 2019-06-12 17:07:41 -07:00
Rishi Gupta
60bf4c0546 settings: Use fa-question-circle-o instead of (?) in org permissions. 2019-06-12 17:02:04 -07:00
Rishi Gupta
495efada4b help: Rename configure-waiting-period-for-full-members. 2019-06-12 17:02:04 -07:00
Rishi Gupta
799d6b9203 org settings: Standardize strings in Other permissions section.
Also, options are now ordered from most restrictive to least restrictive.
A standard style here will be easier to understand and maintain as we add
more settings here.
2019-06-12 17:02:04 -07:00
Vaibhav
9096affe77 css: Move stylesheets not included in the app to another directory.
This moves all the stylesheets like stats, billing etc. to another
directory called `static/styles/portico/`, matching the directory
structure of our JavaScript.
2019-06-12 16:59:52 -07:00
Yashashvi Dave
ee072da47a static/js/settings_notifications: Deduplicate code. 2019-06-12 16:24:51 -07:00
Yashashvi Dave
8e269b4651 models: Rename notification to enable_stream_audible_notifications.
Rename notification property `enable_stream_sounds` to
`enable_stream_audible_notifications` to match with other
notification property patterns.

Fixes part of #12304
2019-06-12 16:24:51 -07:00
Alexandra Ciobica
8f9fa151a6 css: Center left sidebar Add streams icon.
The `+` from the add streams button was not on the same line as the
`#`s and the text was not aligned with streams name.  These changes
fix that.
2019-06-12 16:22:51 -07:00
Alexandra Ciobica
7544d0eb11 css: Add space below Add streams button.
This ensures the browser's showing the link feature doesn't occlude
this button.

Fixes: #12519.
2019-06-12 16:22:02 -07:00
Seth Nickell
93696729c6 notifications: Disable default permission pop up.
Prior to this commit, we'd put up the green "Enable desktop
notifications" bar on page load AND the first time a desktop
notification worthy message was received, it would attempt to notify,
automatically triggering a browser permission popup (the same one as
clicking the green bar results in).

Now, desktop notifications are not attempted at all until the green
bar is clicked. Additionally Firefox and Webkit browser-specific
checks are made more uniform and done at the same point.

Tested written by YashRE42.

Fixes #11504.
2019-06-12 16:12:13 -07:00