Commit Graph

6676 Commits

Author SHA1 Message Date
Joshua Pan 3a74df17de hash_util: Remove unnecessary parameter is_absolute_url.
is_absolute_url was always true. Removed the conditional also.
2018-08-04 17:56:02 -07:00
Steve Howell ecb3879d0c refactor: Break subs dependency in stream_data.
We move remove_deactivated_user_from_all_streams
into stream_events.js.  There were some minor changes
to rename variables and also to not rely on using
`stream_info`.
2018-08-04 14:06:19 -07:00
Abhilash Verma 1d2f8bed92 emoji: Show emoji names with spaces on front-end.
This commit also supports entering emoji names with spaces
replacing them with underscores before saving.

Fixes #10177.
2018-08-04 09:40:52 -07:00
Abhilash Verma 8826ea1eaf settings_emoji: Reduce size to 20px in custom emoji list. 2018-08-04 09:40:52 -07:00
Abhilash Verma fd9652a9d7 settings_emoji: Make strings more user-friendly. 2018-08-04 09:37:48 -07:00
Steve Howell c8898e1dc8 refactor: Move by_conversation_and_time_uri to hash_util.
This removes the 100% coverage on hash_util, but we are
pretty careful about not messing with this code.
2018-08-04 09:32:27 -07:00
Steve Howell ffca07ffdd refactor: Move by_sender_uri to hash_util. 2018-08-04 09:32:27 -07:00
Steve Howell a866f3ec17 refactor: Move huddle_with_uri to hash_util. 2018-08-04 09:32:27 -07:00
Steve Howell fc62e554ce refactor: Move pm_with_uri to hash_util. 2018-08-04 09:32:27 -07:00
Steve Howell 9accc2a3b6 refactor: Move operators_to_hash to hash_utils.
This breaks some unnecessary dependencies on
hashchange.js, in favor of hash_util, which
has fewer dependencies.
2018-08-04 09:32:27 -07:00
Steve Howell ab26e27fef Move stream-related uri helpers to hash_util.
This allows several modules to no longer need
to import `narrow` (or, in our current pre-import
world, to not have to use that global).

The broken dependencies are reflected in the node
tests, which should now run slightly faster.
2018-08-04 09:32:27 -07:00
Steve Howell a4c2971b1e Remove unused uri helpers. 2018-08-04 09:32:27 -07:00
Shubham Dhama db4ee05653 stream_data: Add helper function to get default streams. 2018-08-04 09:27:16 -07:00
Shubham Dhama 14855097c6 input_pill: Add documentation link. 2018-08-04 09:27:16 -07:00
Steve Howell ab22b4411f refactor: Move list of frequent emojis to emoji.js.
All of our data related to emojis is in emoji.js.
Now typeahead_helper no longer depends on emoji_picker.

Generally we want typeahead_helper to only depend
on data modules to avoid complicated circular
dependencies (or at least mitigate them).
2018-08-04 07:59:42 -07:00
Steve Howell f4a8ff415c minor: Fix comments for frequently used emojis.
I think it's a known problem that we don't match
on common aliases for our top N emojis, but I don't
attempt to address that here.  I just made the
comments reflect the names we use in our
current data structures.
2018-08-04 07:59:42 -07:00
Steve Howell 95490e98c9 Break emoji_picker dependency inside util.js.
We don't need util.js to be depending on emoji_picker.js.

The function emoji_prefix_sort is only used
in typeahead_helper, so I just moved the implemenation
to there.
2018-08-04 07:59:42 -07:00
Steve Howell c7ab3884c6 refactor: Extract reload_state module.
This is part of work to break some of our
nastier circular dependencies in preparation
for our es6 migration.

This commit should facilitate loading leaf-like
modules such as people.js before all of the things
that reload.js depends on.
2018-08-04 13:55:02 +00:00
Steve Howell a7d7f6cada settings: Make unsubscribed streams less sticky.
When you unsubscribe a stream by clicking on the
checkmark, we don't want it to disappear right
away, but we also don't need it to stay around
once you start searching for new streams.

Note from Tim: This commit removes some complex code that was just a
workaround for the fact that this widget used to automatically
re-filter immediately after clicking to unsubscribe a user.

Since we've since fixed that original issue, we don't need this.
2018-08-03 16:01:02 -07:00
Steve Howell 04ac832183 Change ui check to ui_report in blueslip.
This was an oversight from an old refactoring.
2018-08-03 15:59:10 -07:00
Akash Nimare edf23cd743 desktop: Update desktop app to v2.3.5. 2018-08-03 10:19:33 -07:00
Tim Abbott b658462a43 locale: Update translations data from transifex.
This includes adding several new languages that now have significant
translations.

Fixes #10165.
2018-08-03 09:49:01 -07:00
Yashashvi Dave aa14d24618 settings: Fix color of icons in custom profile settings. 2018-08-02 17:27:28 -07:00
Tim Abbott 97711ce083 settings: Remove useless duplicated margin-top.
We only needed this margin for the "filter settings" CSS, and it
doesn't take effect anyway due to CSS precedence.
2018-08-02 17:26:56 -07:00
Tim Abbott 0984d876ed settings: Fix styling for admin_filters_table.
Apparently, the 20px top margin was being overriden because it wasn't
deeply layered enough.
2018-08-02 17:24:38 -07:00
Steve Howell 1c2ddb00d1 buddy list: Add padding to progressive scrollings.
We add a padded div to our container for the buddy
list to give scrolling the illusion that we've
rendered every list item, while still letting
the browser do the heavy lifting instead of trying
to fake it out too much.
2018-08-02 16:59:27 -07:00
Tim Abbott 786501f707 buddy list: Shrink #user_presences to 95% width.
This fixes annoying problems where the scrollbar at the right of the
buddy list looks bad where it overlaps the buddy list.
2018-08-02 16:57:25 -07:00
Steve Howell 94884a4418 buddy list: Introduce buddy_list_wrapper div.
This new div allows us to split out two concerns:

    semantic list of items - remains in #user_presences
    widget real estate - controlled by new #buddy_list_wrapper

We will use this for progressive rendering.  We want to add
padding to the buddy list without messing with the integrity
of the actual HTML '<ul>' list.  (One ugly alternative would
have been to add a dummy list item, which be a pitfall for
any code traversing the list.)

Basically, all the code relating to click handlers and similar
things was left alone.  We only change js/css related to
scrolling, resizing, and overflow.
2018-08-02 16:56:50 -07:00
Steve Howell 1a84af1e79 buddy list: Add v1 progresive scrolling.
This version of progressive scrolling lazily
renders buddy list items, but it doesn't
provide the browser with any notion of upcoming
list items, so as you scroll down and the size
of the rendered list grows, the scrollbar shows
you being too close to the bottom.

This maintains 100% coverage on buddy_list.js.
2018-08-02 16:56:50 -07:00
Steve Howell 407b13af25 list_cursor: Replace container with scroll_container_sel.
Our lists tend to have both containers and scroll_containers,
and we care more about the latter to the extent they're
different.
2018-08-02 16:56:50 -07:00
Shubham Dhama 4a53560106 settings_users: Change users "Make admin" button to dropdown.
This is done taking "Guest user" into account as we're soon
gonna support that.
2018-08-02 15:55:50 -07:00
Shubham Dhama 338acb1008 settings_users: Change class name for "Save changes" button. 2018-08-02 15:55:50 -07:00
Shubham Dhama 7776fa0d05 settings_user: Move "Make admin" button to user-info-form modal. 2018-08-02 15:55:50 -07:00
Shubham Dhama 4206314184 settings_users: Update admin_icon with admin change event. 2018-08-02 15:55:50 -07:00
Shubham Dhama 6d699ff59c settings_user: Add icon for admin users. 2018-08-02 15:55:50 -07:00
Sampriti Panda bcab6748ff subs: Remove default selected tab in subscriptions modal.
Earlier, on opening the subs modal, the "Subscribed" tab would be selected
by default when the components.toggle was created for tab switching.
This would change the hash to `#streams/subscribed`, and then extra work had
to be done to change it back to `#streams/all` leading to a longer open times.

With this change, `#streams` and `#streams/subscribed` both take you to
the "Subscribed Tab", and `#streams/all` takes you directly to
the "All Streams" tab.
2018-08-02 10:20:01 -07:00
Cynthia Lin 0f34e2fe3c subs: Fix broken streams list header/search container in Safari.
Fixes #10064.
2018-08-02 09:55:32 -07:00
Tim Abbott 9779117e3c message_flags: Add a comment to explain the update_starred flag. 2018-08-01 11:11:32 -07:00
Tim Abbott 4b4d420a5f message_flags: Clarify name for toggle_starred_and_update_server.
This makes it clear that the function sends the update to the server,
not just toggling the UI or local data structures.
2018-08-01 11:09:12 -07:00
Joshua Pan 2fcc54ac14 ui: Rename update_starred to update_starred_view. 2018-08-01 11:07:44 -07:00
Roman Godov 5e70577f84 models: Rename Realm.show_digest_email field.
This renames Realm.show_digest_email field to
digest_emails_enabled, for greater clarity as to what it does
just from seeing the setting name, without having to look it up.

Fixes part of #10042.
2018-08-01 11:05:58 -07:00
Shubham Dhama 5fafddaef5 settings_user: Use `person` as an argument in open_user_info_form_modal. 2018-08-01 10:39:03 -07:00
Sampriti Panda d917901ca3 subs: Fix bug with narrow_to_row callback in subs modal.
We set the keep=false for the narrow_to_row callack so that it is deleted
once the subs modal is opened. Previously, this callback would cause issues
when you then tried to open the All Streams Settings as it would narrow to
the stream row.
2018-08-01 10:14:09 -07:00
Cynthia Lin 9efe907ef1 night_mode: Use nested selectors to change night mode element styling.
This is a SASS-exclusive feature that simplifies a majority of the night
mode selectors.
2018-07-31 17:41:27 -07:00
Cynthia Lin 0314d63e7a night_mode: Improve legacy searchbox styling to fit night mode. 2018-07-31 17:41:27 -07:00
Cynthia Lin ae48010158 night_mode: Improve pill searchbox styling to fit night mode. 2018-07-31 17:41:27 -07:00
Tim Abbott 0044866682 events: Fix starring logic correctly.
In 47aaa73f96, we fixed one issue, which
is that server_events_dispatch.js was calling `update_starred` with
the wrong arguments, but created a new one (toggle_starred wasn't
updated) and missed another (which is that we weren't ever updating
message.starred, and thus if you toggle a message's star-state in one
browser, and then tried to toggle it back in a second, it would feel
like the click didn't work, because it was trying to toggle
e.g. off->on a second time).
2018-07-31 17:38:24 -07:00
Cynthia Lin cdbb38096a night_mode: Fix broken background color for user profile. 2018-07-31 17:06:11 -07:00
Joshua Pan 47aaa73f96 events: Fix buggy update starred event.
Fixes #10111.
2018-07-31 14:47:36 -07:00
Akash Nimare cc6af84a08 portico: Redesign download button on apps page.
This PR updates the styling of download button so
that it matches with the other buttons on portico pages.

Partially fixes #10104.
2018-07-31 14:18:28 -07:00