Commit Graph

7771 Commits

Author SHA1 Message Date
Abhinav Singh c27d927663 refactor: Remove inline javascript code in email_log.html.
All the inline javascript code present in email_log.html(which is
rendered when the user visits "/emails" in development mode) is
transferred to a new file: email_log.js in portico/ directory.

Fixes #11608.
2019-04-05 17:28:23 -07:00
Vaibhav 69660da0e1 message_list_view: Remove check specific to undefined for "is stream".
Private messages too have non-`undefined` stream name. It is usually
an empty string. The check has been changed to not check specifically
for stream name to be undefined.
2019-04-05 17:26:05 -07:00
Vaibhav 6191b4d93a copy_and_paste: Change copy div css to match "day mode".
Color and background is made according to "day mode"
exclusively here because when copying the content
into, say, Gmail compose box, the styles come along.
This is done to avoid copying the content with dark
background when using the app in night mode.

We can avoid other custom styles since they are wrapped
inside another parent such as `.message_content`.
2019-04-05 17:13:20 -07:00
Vaibhav 7f27c09704 markdown: Add rendered_content selector to night-mode syntax highlight.
This adds a parent selector, `rendered_content`, to night mode syntax
lighlight selector. This helps us in getting the "day mode" syntax
highlight styles in night mode.
2019-04-05 17:13:20 -07:00
Vaibhav 5c36918c17 markdown: Add .rendered_markdown for all elements with rendered MD content.
This adds a class `rendered_markdown` for all the elements which have
rendered markdown content; This is done to add different styles for
rendered content in day mode and night mode.

Also replace the element selectors from CSS to use the class.
2019-04-05 17:13:20 -07:00
Priyank Patel 6441ad0677 user-profiles: Lazy load profile pictures when in view.
Using lazysizes we only load images if they are in view.
This decreases load time and save more bandwidth since images are loaded
after html is loaded and if they are on screen.

Fixes #3564.
2019-04-05 15:51:02 -07:00
Eeshan Garg bc430909af webhooks/intercom: Implement support for all events. 2019-04-05 15:15:52 -07:00
Alexandra Ciobica 0c328d9617 css: Add spacing between info and image on /apps.
Fixes: #11811.
2019-04-04 11:32:58 -07:00
Thomas Ip b8e1b8d6ff coverage: Bring dict.ts line coverage back to 100%.
The delete operator could throw a TypeError when attempting to
remove a non-configurable property, which is rare in practice since
they can only be created using `Object.defineProperty()` and
`Object.freeze()`. We also never uses the output of `del()` anyway.
2019-03-30 17:12:50 -07:00
Marco Burstein feadc8bf46 portico: Fix trapsarent gradient styling inconsistencies.
Instead of using the `trapsarent` keyword, which is interpreted
as Safari as black with an opacity of 0%, re-use the gradient colors
themselves in order to lead to a single color gradient. This allows
for the homepage to look the same regardless of browser.

Fix #11985.
2019-03-25 16:25:58 -07:00
Abhinav Singh 62d9241c03 refactor: Remove inline javascript code from accounts_send_confirm.html.
This commit removes inline javascript code present in
accounts_send_confirm.html and moves it to signup.js. This page is
rendered when the "/accounts/send_confirm" endpoint is visited. An
empty div element is added in accounts_send_confirm.html with
unique data-page-id attribute to make it more easy to find in which
page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 4b8f6b55be refactor: Remove inline javascript code from reset_confirm.html.
This commit removes inline javascript code present in reset_confirm.html
and moves it to signup.js. The reset_confirm.html page is rendered when
the user visits "/accounts/password/reset" confirmation page. An empty
div element is added in reset_confirm.html with unique data-page-id
attribute to make it more easy to find in which page we are, while
working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 17d9c24094 refactor: Remove inline javascript code from reset.html.
This commit removes inline javascript code present in reset.html and
moves it to signup.js. The reset.html page is rendered when the user
visits "/accounts/password/reset". An empty div element is added in
reset.html with unique data-page-id attribute to make it more easy
to find in which page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh d52e3b0d70 refactor: Remove inline javascript code in dev_login.html.
A new javascript file "dev-login.js" is created in static/js/portico/
and the inline javascipt code present in dev_login.html is transferred
to that file. An empty div element is added in dev_login.html with
unique data-page-id attribute to make it more easy to find in which
page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 65d9d017c3 refactor: Remove inline javascript code from create_realm.html.
This commit removes inline javascript code present in create_realm.html
and moves it to signup.js. The create_realm.html page is rendered when
the user visits "/new". An empty div element is added in
create_realm.html with unique data-page-id attribute to make it more easy
to find in which page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 2a14fcf3e9 refactor: Remove inline javascript code from accounts_home.html.
This commit removes inline javascript code present in
accounts_home.html and moves it to signup.js. The accounts_home.html
page is rendered when the user visits "/register". An empty div
element is added in accounts_home.html with unique data-page-id
attribute to make it more easy to find in which page we are, while
working with the javascript code.
2019-03-25 15:14:24 -07:00
Abhinav Singh 4efef4f1a5 refactor: Remove inline javascript code from login.html.
This commit removes inline javascript code present in login.html and
moves it to signup.js. An empty div element is added in login.html
with unique data-page-id attribute to make it more easy to find in
which page we are, while working with the javascript code.
2019-03-25 15:14:24 -07:00
Nikhil-Vats 38be5ea743 message_edit_history: Add UI for seeing topic edits.
Users can previously see only message content edits, this will enable
them to see topic edits too in the same section, fixes #3731.

Fixes #3731.
2019-03-25 15:10:47 -07:00
Thomas Ip a2872c107e typescript: Move TS files into JS directory.
This is just a code reorganization to avoid making it difficult to
find things as we migrate more file to TypeScript.
2019-03-25 12:11:37 -07:00
Hemanth V. Alluri 9ed1dcc4b6 webhooks: Add Bitbucket Server integration.
This commit adds support for all "repo" events.
2019-03-24 22:06:29 -02:30
Anders Kaseorg 324b1d52cb modals: Replace modal dialog scale transition with short slide.
This works better with SimpleBar (see
https://github.com/Grsmto/simplebar/issues/274).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-03-21 17:27:45 -07:00
Vishnu Ks 34b8626959 help: Increase the width of sidebar scrollbar. 2019-03-21 16:57:25 -07:00
Vaibhav e2115ad0ba refactor: Nest night-mode syntax highlighting rules into `body.night-mode`.
Rather than using the parent selector multiple times, all the rules
are nested inside one selector.
2019-03-21 16:51:40 -07:00
Vaibhav 46b2d9d328 markdown_docs: Fix styling for in-app docs for inline code.
This adds a selector `#message-formatting` which is basically the
modal id to apply night mode style to inline code in the modal.
2019-03-21 16:51:40 -07:00
Pragati Agrawal 2e67cf38b3 composebox_typeahead: Remove unnecessary string operation.
slice always returns a new string, so this could have been motivated
by ensuring we always duplicate the string, but reading the code, it's
already sliced by the caller.
2019-03-21 13:33:27 -07:00
Pragati Agrawal f617008924 typeahead_helper: Add sorter function for slash commands.
This adds a `sort_slash_commands` function in typeahead_helper to sort
slash commands.
2019-03-21 13:33:27 -07:00
Pragati Agrawal 76a35bf1d9 typeahead: Add typeahead for slash commands.
This is the follow-up of PR #10267.
Here, we add typeahead for slash commands `/me` and `/poll` in compose box.

The slash typeahead will open only when `/` is the first character and all
slash commands will be displayed when one types `/`, as this helps a lot in
discoverability. This also adds a description of what the slash command
does in the typeahead.
2019-03-21 13:33:27 -07:00
Rishi Gupta b47e6d0d94 help: Add status-and-availability. 2019-03-21 12:56:38 -07:00
Rishi Gupta 52fb22277b onboarding: Remove get_newbie_stream from stream_data.js.
A relic of a past system removed in
9fbd990d1a. It is not being called
anywhere in the code.
2019-03-21 12:34:16 -07:00
Thomas Ip 7d050ab0cf typescript: Migrate dict.js to typescript. 2019-03-21 10:48:44 -07:00
Thomas Ip 676eafae7e typescript: Declare untyped JS modules. 2019-03-21 10:44:34 -07:00
Shubham Dhama 238885ca86 settings_users: Remove meta.current_deactivate_user_modal_row workaround.
The removes meta.current_deactivate_user_modal_row workaround by a more
readable and clear way.
2019-03-20 22:34:57 -07:00
Shubham Dhama 7ab0c26bda settings_users: Refactor some code for deactivate button. 2019-03-20 22:34:57 -07:00
Shubham Dhama 41140f2e46 settings_users: Use update_view_on_deactivate to update deactivate view.
This removes the function update_button_on_success as the action performed
by it can be done by update_view_on_deactivate.
2019-03-20 22:34:57 -07:00
Shubham Dhama f0c069a316 settings_users: Make update_view_on_reactivate function generic.
This also remove:
- meta.current_bot_element: As usage of meta has been wrongly exploited, we
  should refrain us from using meta this way i.e. to share variable between
  function using the global variable, as they reduce code readability.

- update_view_on_deactivate_reactivate_failure: Again to deduplicate the the
  code we're compromising with readability which isn't worth it here, also
  we need to this because we have removed above meta key.
2019-03-20 22:34:57 -07:00
Shubham Dhama 53abbd9408 settings_users: Remove redundant usage of `.user-admin-settings`.
No class with this name exist in codebase.
2019-03-20 22:34:57 -07:00
Shubham Dhama 42d19ababe settings_users: Fix update_view_on_deactivate to take row as an argument.
We should pass row as an argument to update_view_on_deactivate because we
update deactivate view of a row when the user get activated/deactivated by
the event system.

This also removes a redundant data variable.
2019-03-20 22:34:57 -07:00
Shubham Dhama 96aac91119 settings_users: Fix misleading comment.
This fixes a misleading comment as we want to change the view for both bots
    and users, whose active state is changed.
2019-03-20 22:34:57 -07:00
Shubham Dhama 060eacc980 settings_users: Move update_view_on_reactivate up.
This is done just to make code more readable.
2019-03-20 22:34:57 -07:00
Tim Abbott 0320355f09 echo: Add a minimum time for sending error spinner.
This at least makes clear that the button did something.
2019-03-19 13:30:46 -07:00
Tim Abbott a6c0ac44be css: Make message_failed icons always visible.
This fixes the confusing behavior that errors sending messages were
not immediately user-visible.

Based on work by Dominik Gryboś in #11479.

Fixes #10537.
2019-03-19 13:30:28 -07:00
Tim Abbott 9e85478010 css: Fix sizing and height of message_failed error icons.
Inspired by work by Dominik Gryboś in #11479.
2019-03-19 13:30:27 -07:00
Tim Abbott 4ae325ce6c css: Fix alignment of message_controls.
They were 1px too high.
2019-03-19 13:30:27 -07:00
Tim Abbott f9eeddc78c css: Limit message_failed class to inside message_controls.
This is mostly for readability.
2019-03-19 13:30:27 -07:00
Tim Abbott 8700d14c15 css: Remove unused message_local CSS class.
This is likely a very old legacy feature.
2019-03-19 13:30:27 -07:00
Tim Abbott 36b18cd183 css: Use SCSS nesting for message_controls region. 2019-03-19 13:30:27 -07:00
Tim Wissel ab6c39c94b bugfix: Hide tooltips when switching a narrow.
Fixes #4639.
2019-03-19 12:28:39 -07:00
Tim Abbott 38de5740fa integrations: Reduce excessive margin below sidebar headings.
This just didn't look good.
2019-03-19 11:08:51 -07:00
sameerchoubey 2efe1963a5 portico: Add /api links to /integrations.
This PR creates a custom section on the /integrations page and adds
links to /api for common requests.

Fixes #11803.
2019-03-19 11:08:38 -07:00
Pragati Agrawal 9037ef56dc org_settings: Disable `Deactivate` button for yourself in Users tab.
This disables the Deactivate button for the current user in the Users tab,
so that it becomes hard to deactivae yourself accidently from Users tab.

Fixes #10427.
2019-03-18 22:41:09 -07:00