Commit Graph

3440 Commits

Author SHA1 Message Date
Brock Whittaker ed4866b9f9 message-feed: Improve scroll perf by removing scaling on emojis.
This removes scaling from the emojis by changing the background size to
a lower value and then allowing for the widths and heights of the
emojis to be proportionally smaller.

The transform: scale property would cause many more repaints in Chrome
and other browsers than should have been necessary which would render
messages above and below the feed light grey boxes that would
momentarily flash as blank before filling with content.

Modified by tabbott to use a percentage in the background-size.

Fixes #4660.
2017-05-03 14:49:47 -07:00
Tim Abbott b20a24875a emoji: Switch to using iamcal sprite sheets for reactions and pickers.
Without changing how we render emoji in messages or changing the data
set used for emoji names, this switches us to the superior
percentage-based system for choosing which emoji from the spritesheet
to select and the iamcal sprite sheets.

It requires some small changes to CSS to ensure emoji are centered
properly in the new design.

Based on Harshit Gupta's work on "Interrelated emoji infrastructure changes".
2017-05-03 13:30:42 -07:00
Tim Abbott ddd3bbd32c echo: Separate realm emoji formatting from normal emoji. 2017-05-03 13:28:50 -07:00
Cory Lynch 5d6724345a Fix scrollbar stylining for reactions picker.
Scrollbar previously collapsed when searching for
emoji and became misaligned. Fixed in CSS.
2017-05-02 14:23:26 -07:00
Tim Abbott 07db233ffd register: Remove long-unused company-email HTML/CSS. 2017-05-01 17:18:03 -07:00
Rohitt Vashishtha 47eb19331d ux: Display error on login/registration if no auth backends are enabled.
Also makes a small tweak to CSS to ensure the styling is consistent on
the two pages.

Fixes #4525.
2017-05-01 17:17:37 -07:00
Brock Whittaker 2fafc6bec5 Change streams subscriber lists to render progressively. 2017-05-01 16:56:54 -07:00
Brock Whittaker 4e980ad545 Change <thead> styling in settings containers.
Tables were previously improperly using the <tbody> to show the headers
so it was not obvious that the styling for <thead> did not represent
the styling of the rest of the tables anymore, so this normalizes
the styling to be consistent with how it looked when the first row
was in the <tbody>.
2017-05-01 16:56:54 -07:00
Brock Whittaker 0ffdfa3699 Change from `toLowerCase` => `toLocaleLowerCase`.
This now respects the locale of the string set and will lowercase it
respective of the character set rather than standard latin/English.
2017-05-01 16:56:54 -07:00
Steve Howell 23df948457 left sidebar: Scroll to newly pinned streams.
If we pin a stream, we now scroll up as needed to make sure the
stream is still in view after pinning it.  (Note that we don't do
this in the un-pinning case, since users un-pinning stuff may be
doing cleanup on pinned streams they no longer care about.)

Fixes #1714.
2017-05-01 16:39:37 -07:00
Steve Howell 07633b3872 left sidebar: Scroll to newly activated streams.
When we activate a stream (or one of its topics), we now scroll
the sidebar so that the stream comes into view.  We scroll it
just enough to get it to the top or the bottom, depending on
where it had been offscreen before.
2017-05-01 16:39:37 -07:00
Brock Whittaker f599b517d3 Switch checkbox styling to new style in #invite.
The checkboxes in invite are now converted in this commit to the new
style.
2017-05-01 16:01:36 -07:00
Brock Whittaker 3ff55034fe admin: Restyle administration checkboxes to match new style.
This restyles the administration checkboxes to look similar to those
that are currently present in the settings section.
2017-05-01 16:01:36 -07:00
Tim Abbott f4262e0169 message_edit: Fix exception closing "view source".
This fixes a regression introduced in
81a575e4d5.
2017-05-01 15:08:01 -07:00
Tim Abbott 03b7be17a6 settings: Fix unnecessary/ugly exclamations in error messages.
The previous code would produce errors of the form "Failed!: ...".
2017-05-01 14:50:20 -07:00
K.Kanakhin f13d6a18eb realm-emoji: Add realm emoji uploading instead url providing.
- Add file_name field to `RealmEmoji` model and migration.
- Add emoji upload supporting to Upload backends.
- Add uploaded file processing to emoji views.
- Use emoji source url as based for display url.
- Change emoji form for image uploading.
- Fix back-end tests.
- Fix front-end tests.
- Add tests for emoji uploading.

Fixes #1134
2017-05-01 14:50:20 -07:00
Tim Abbott 0785c377a4 zephyr: Fix link to webathena login from error bar.
This was apparently broken when we moved the webathena login errors
out of the right sidebar.
2017-04-30 21:31:25 -07:00
Tim Abbott cfeff245c1 emoji: Manage Zulip emoji as a custom/extra realm emoji.
This is prerequisite for converting our emoji system to work off of
iamcal sprite sheets.

Also, fixes #4308.
2017-04-30 16:40:31 -07:00
Tim Abbott 5321e2e2c1 hotkey: Reorder compose and emoji picker escape handlers.
This fixes an issue where escape could close the compose box, not the
compose emoji picker.
2017-04-30 15:15:33 -07:00
Jack Zhang df817f12f4 emoji: Rename reaction-popover to emoji-popover.
The name emoji-popover should now be more appropiate, as there's no more
need to distinguish between reacting to messages and composing messages.
2017-04-30 15:15:33 -07:00
Jack Zhang a9505654da emoji: Replace the old compose emoji picker with the reactions picker.
This removes the old compose emoji picker in its entirety, changing
the few callbacks needed to launch the reactions-style emoji picker
instead and hook it up properly.

Callbacks for reactions and composing messages are distinguished by
selecting for, respectively, the .reaction and .composition classes.

Fixes #4122.
2017-04-30 15:14:42 -07:00
Jack Zhang 58a92a0eff emoji: Extend reaction_popover_content template for compose. 2017-04-30 15:09:43 -07:00
Tim Abbott 87d06268ca toggle_reactions_popover: Support being passed no message ID.
This is intended to facilitate calling this function for the compose
picker, where there is no message yet.
2017-04-30 15:08:51 -07:00
Jack Zhang 3c257a19c0 emoji-picker: Extract generate_emoji_picker_content.
This is a pure refactor, with no functional changes.
2017-04-30 15:02:12 -07:00
Tim Abbott 66f927762b emoji_picker: Extract compute_placement function.
Thanks to Jack Zhang for identifying this useful refactoring.
2017-04-30 14:41:54 -07:00
Jack Zhang f8b3ce7d15 emoji: Move all emoji picker logic/events into emoji_picker module.
Added emoji_picker.js to static asset pipeline.
2017-04-30 14:13:36 -07:00
Aditya Bansal cab87fef2a Refactor: Extract default-language-modal to be a partial.
We are doing this refactor for the sake of keeping our template
consistent with the indentation policy and maintaining its
readability at the same time.
2017-04-29 08:35:25 -07:00
fionabunny 78f2df5649 home.py: move initial_pointer as pointer to register_ret.
This is the last of the fields in page_params that could come from
register_ret but wasn't doing so.
2017-04-28 23:39:14 -07:00
fionabunny d3e7e6542a home.py: move user_profile full_name to register_ret.
Move the user_profile data section down into fetch_initial_state_data
so it entirely pulls from register_ret for #3853.
2017-04-28 23:31:28 -07:00
Tim Abbott df8f4a837c home: Get page_params.enable_desktop_notifications from register_ret. 2017-04-28 23:15:35 -07:00
Tim Abbott c4eeb13353 account-settings: Always display the medium-size avatar. 2017-04-28 23:09:32 -07:00
fionabunny 4696819629 Restructure format of avatar events and push into register_ret.
This moves the avatar_ fields in page_params to come from
register_ret.  Unlike many fields, changing this had a bit of
complexity, because the avatar update events didn't actually contain
some of the details required for moving these into register_ret to
work correctly without races.

We fix that as part of this change.

Modified significantly by tabbott.
2017-04-28 23:04:01 -07:00
Tim Abbott 2a16cc1d24 home: Get enable_stream_desktop_notifications from register_ret. 2017-04-28 22:01:46 -07:00
Tim Abbott 2a8a101fe2 home: Get page_params.enable_stream_sounds from register_ret. 2017-04-28 21:56:58 -07:00
Tim Abbott 30db811167 home: Get page_params.enable_sounds from register_ret. 2017-04-28 21:54:05 -07:00
fionabunny 78bcbc79d6 home.py: move people_list as realm_users to register_ret.
Simplify the page_params generation logic #3853
2017-04-28 21:33:33 -07:00
fionabunny 7db8c61aac home.py: move event_queue_id as queue_id to register_ret.
Simplify the page_params generation logic #3853
2017-04-28 21:33:17 -07:00
Tim Abbott 27f07e6a99 activity: Remove page_params.presences after use.
This is just meant to avoid there being any confusion about whether
this field does anything after this point.
2017-04-28 21:31:19 -07:00
fionabunny 453fc06686 home.py: move initial_presences as presenses to register_ret.
Simplify the page_params generation logic #3853.
2017-04-28 21:30:29 -07:00
fionabunny 84c4d67916 home.py: move bot_list as realm_bots to register_ret.
Simplify the page_params generation logic #3853
2017-04-28 21:24:44 -07:00
fionabunny a7192f4334 home.py: move neversubbed_info as never_subscribed to register_ret.
Simplify the page_params generation logic #3853
2017-04-28 21:24:44 -07:00
fionabunny 5676eaab50 home.py: move unsubbed_info as unsubscribed to register_ret.
Simplify the page_params generation logic #3853
2017-04-28 21:24:43 -07:00
fionabunny 26d080cf64 home.py: rename subbed_info and move to register_ret. 2017-04-28 21:24:43 -07:00
fionabunny b7c6d46bf9 home.py: move password_auth_enabled as realm_password_auth_enabled.
Part of #3853.
2017-04-28 21:23:48 -07:00
fionabunny 635a05fe80 home.py: move name_changes_disabled as realm_name_changes_disabled.
This appears to have been partially completed prior.  Part of #3853.
2017-04-28 21:12:23 -07:00
fionabunny 70fe2eab60 home.py: move is_zephyr_mirror_realm as realm_is_zephyr_mirror_realm.
Part of #3853.
2017-04-28 21:12:16 -07:00
fionabunny 935ddf3b17 home.py: move show_digest_email as realm_show_digest_email.
Part of #3853.
2017-04-28 21:12:10 -07:00
fionabunny 64041e0da1 home.py: move mandatory_topics as realm_mandatory_topics to register_ret.
Part of #3853.
2017-04-28 21:12:05 -07:00
fionabunny 6d2785c853 home.py: move domains as realm_domains to register_ret.
Part of #3853.
2017-04-28 21:11:56 -07:00
Cory Lynch e972453a73 message edit: Remove Topic and Content labels.
Removed the components from the template and
cleaned up the relevant css.

Fixes #4562
2017-04-28 20:57:06 -07:00