Commit Graph

28232 Commits

Author SHA1 Message Date
Marco Burstein fa95ba9812 style: Fix the stream and user list buttons on mobile in night mode.
These buttons are displayed with a lighter background than other
buttons. Update their borders and background colors (along with the
border on the search box) so that they match the night theme.

Fix #10301.
2018-08-21 12:42:06 -07:00
Vishnu Ks 9bb338be11 models: Add plan_type to Realm. 2018-08-21 12:39:06 -07:00
Yashashvi Dave 6031ccff5c user pills: Every pills-container must include div-input element.
Expect div-input element in every pill-container even though pills are
not editable.  This is correct, because `input_pill.js` appends pills
before the div-input element.
2018-08-21 12:10:36 -07:00
Yashashvi Dave 4f9ca03c13 user profile popover: Display user pills in custom user field.
Display user pills instead of user names in custom user field
on user profile popover.
2018-08-21 12:10:35 -07:00
Yashashvi Dave 9812b81a1e user pills: Rename class `notmem` to `not-editable` for generalization. 2018-08-21 11:50:01 -07:00
Tim Abbott 5f10fa1692 user_profile_modal: Remove profile_data conditional.
It's no longer possible for profile_data to be empty, and the
conditional was in the wrong place anyway.
2018-08-21 11:49:36 -07:00
Yashashvi Dave 92782e2f89 static/js/popovers.js: Modify structure of user popover template data.
Modify structure of template data used to render
`user_profile_modal.handlebars`.

This is preparatory commit to display user pills in user profile
popover instead of user names in user type custom fields.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 9e9bb18244 user profile popover: Use long local date format in custom-date-field.
Use long local date format `MMMM DD, YYYY` instead of short `MM/DD/YY`
in custom profile date field.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 6622f995b0 user profile popover: Rename user last seen.
Rename "Last seen just now" to "Just now",
and "Unknown" to "More than 2 weeks ago"
in user profile popover.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 150ea61271 custom profile field: Improve style of user pills in user type field.
Improve style of user pills in user-type-custom-field on
account settings page.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 1e27cb18eb user profile popover: Hide popover when user clicks on edit-profile-btn. 2018-08-21 11:42:59 -07:00
Yashashvi Dave 583fde4311 custom profile field: Set default values in create-field form on load.
Add call of reset function, on load of admin settings page.
This function reset values in create-new-field form, i.e.
field type.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 03f5422ce8 custom profile field: Minor tweaks in field-table in admin settings.
This commit add minor changes in profile field table in
admin settings:
 - Hide table header if there is no field
 - Fix width of table column
2018-08-21 11:42:59 -07:00
Yashashvi Dave 66c2b6d2a6 custom profile field: Remove unnecessary table header from edit form.
Remove unnecessary table header in edit-choice-field form.
2018-08-21 11:42:58 -07:00
Yashashvi Dave d5f3c9b3bc custom profile field: Rename field types in UI. 2018-08-21 11:37:51 -07:00
Yashashvi Dave 463fb622b6 custom profile field: Remove all static use of field-type name or id.
This commit removes all static use of field-type's name or id in
frontend.
2018-08-21 11:37:51 -07:00
Yashashvi Dave 6e65235a6d zerver/lib/events.py: Add FIELD_TYPE_CHOICES_DICT to page_params.
This commit add FIELD_TYPE_CHOICES_DICT to page_params and replace
FIELD_TYPE_CHOICES.

FIELD_TYPE_CHOICES_DICT includes all field types with keyword, id
and display name. Using this field-type-dict, we can access field
type information by it's keyword, and remove all static use of
field-type'a name or id in frontend.
This commit also modifies functions in js where this page_params
field-types is used.
2018-08-21 11:37:51 -07:00
Yashashvi Dave 621a5cdc35 zerver/models.py: Modify FIELD_TYPE_DATA, add keyword for field type.
This commit modifies FIELD_TYPE_DATA dict in `CustomProfileField`
model to store keyword of field types. And create new dict
FIELD_TYPE_CHOICES_DICT to store all field type information
by field type keyword, i.e. id, name.

This is preparatory commit to remove all static use of field
types in frontend and access field type with keyword instead
of display name.
2018-08-21 11:37:51 -07:00
Tim Abbott 24f3419449 postgres-init-db: Throw an error if not run as root.
Fixes part of the dicsussion in #552.
2018-08-21 11:36:50 -07:00
Max Nussenbaum eaefa31969 portico: Fix mis-sized bullets.
This fixes the mis-sized text in the bulleted lists on /for/
working-groups-and-communities (and some other pages), by ensuring
p tags inside li tags don't get font-size styling applied to them
twice.
2018-08-21 11:34:39 -07:00
Rishi Gupta a04d1e3d98 docs: Update intros to production install pages.
We should cut to the chase where we can.
2018-08-21 11:32:16 -07:00
Steve Howell a6bc3886e6 refactor: Extract send_peer_remove_event().
This prevents leaking some variables into an already
cluttered function.

We also add test coverage for what's now an
early-exit condition in the new function--we exempt
public MIT streams from these events.
2018-08-21 11:23:40 -07:00
Steve Howell 092bb6a728 tests: Refactor test_bulk_subscribe_MIT().
We extract a couple local vars to avoid
repeating ourself.

We also explictly set the stream as a zephyr stream.
2018-08-21 11:23:40 -07:00
Steve Howell e7062b77c8 tests: Test superuser can also mirror to private streams.
This extends a test that proved only what Cordelia
could do with/without super_user privileges when she
was trying to send to an unsubscribed stream as herself.

Now the test shows the same powers extend to Cordelia
when she's sending messages on behalf of a mirrored
user.
2018-08-21 11:23:40 -07:00
Steve Howell aee46bb1e9 tests: Test forging timestamps for mirrored messages. 2018-08-21 11:23:40 -07:00
Steve Howell 79fb36c599 refactor: Extract maybe_add_event() function.
This change was partially driven by a quirk in Python
where peephole optimizations make `continue` lines
appear not to be covered.

I also think it's generally a good idiom to extract
functions for loop bodies when they don't actually
accumulate values or maintain other state.  With this
commit we now prevent potential bugs for vars like
`is_stream` leaking between loop iterations.
2018-08-21 11:23:40 -07:00
Steve Howell e99c0929f0 tests: Test race handling for creating mirror users.
We simulate a race condition by mocking create_user
to actually create a user, but then raise an
IntegrityError (as if another process had actually
created the user, not our test).

I also changed the real code to use explicitly
named parameters.
2018-08-21 11:23:40 -07:00
Tim Abbott 0068a5ccd6 events: Fix can_subscribe_other_users not being set properly.
I don't understand why this didn't cause test failures in CI; this
change was clearly required and test_change_realm_property was failing
consistently for me locally.
2018-08-21 11:20:59 -07:00
Yago González 6949ce1bad templates: Replace   with normal spaces.
This line full of non-breaking spaces dates back to before Zulip being
open sourced (ca4e6a0ff), so we can assume it was a fix that we don't
need anymore.
2018-08-21 11:13:47 -07:00
Rishi Gupta 99b55b712b user docs: Shorten instructions when using relative settings links. 2018-08-20 21:26:01 -07:00
Rishi Gupta 36d495736a user docs: Rename display-emoji-as-text. 2018-08-20 19:24:36 -07:00
Rishi Gupta 33c586d3ec user docs: Update enable-emoticon-translations. 2018-08-20 19:24:36 -07:00
Rishi Gupta 2df6662d8c docs: Add clarification for help wanted and good first issue labels. 2018-08-20 19:17:47 -07:00
Rishi Gupta 9a759060cd user docs: Remove outdated app guides. 2018-08-20 18:52:04 -07:00
Rishi Gupta 1f2ed31791 user docs: Add related articles to desktop install guide. 2018-08-20 18:22:30 -07:00
Rishi Gupta 0f44d380ca user docs: Update save-changes.md. 2018-08-20 17:11:53 -07:00
Lyla Fischer 43f2a99f2a user docs: Trim change-a-users-name. 2018-08-20 17:11:53 -07:00
Lyla Fischer f3324f9748 user docs: Trim make-a-user-an-administrator. 2018-08-20 17:11:53 -07:00
Tim Abbott 6827c42e02 migrations: Fix accounting in is_private migration.
The previous logic didn't correctly handle the case of total being 0.

Fixes #10378.
2018-08-20 16:49:08 -07:00
Lyla Fischer f4d1283b6c user docs: Update deactivate-or-reactivate-a-bot. 2018-08-20 15:50:16 -07:00
Lyla Fischer 172cde6af6 user docs: Add restrict-bot-creation. 2018-08-20 15:50:16 -07:00
Lyla Fischer 603dedbfec user docs: Update set-default-streams-for-new-users. 2018-08-20 15:02:39 -07:00
Lyla Fischer 614da57f8a user docs: Update add-or-remove-users-from-a-stream. 2018-08-20 15:02:39 -07:00
Lyla Fischer c183c5059e user docs: Update change-the-privacy-of-a-stream. 2018-08-20 15:02:39 -07:00
Lyla Fischer f79614a7dd user docs: Update change-stream-description. 2018-08-20 15:02:39 -07:00
Lyla Fischer f1462d096e user docs: Update rename-a-stream. 2018-08-20 15:02:39 -07:00
Lyla Fischer 6fc214929c user docs: Update delete-a-stream. 2018-08-20 15:02:39 -07:00
Abhilash Verma 0e2322a322 logging: Show timestamp in UTC in non-django production scripts.
Done in pair programming with @aero31aero.

Fixes #9678.
2018-08-20 12:52:40 -07:00
Rohitt Vashishtha 920ef2b7f7 bugdown: Add mention_data.get_user_by_id().
This will allow us to do the lookups required to support the upcoming
`@**name|id**` syntax.
2018-08-20 12:46:46 -07:00
Rohitt Vashishtha 8a61ac3500 typeahead: Move displaced comment to correct location. 2018-08-20 12:44:24 -07:00