Commit Graph

8499 Commits

Author SHA1 Message Date
Vaibhav 591ebb22bf css: Use SCSS nesting for .draft- row, info-box and controls. 2019-08-15 22:39:39 -07:00
Vaibhav 585b6680ae css: Reorder drafts.scss so .draft-row are together. 2019-08-15 22:39:39 -07:00
Vaibhav 067c9040e7 css: Use SCSS nesting for .drafts- container, header and list. 2019-08-15 22:39:39 -07:00
Vaibhav b940406877 css: Reorder drafts.scss so .drafts-container are in same place. 2019-08-15 22:39:39 -07:00
Pragati Agrawal 693df05ca7 settings_users: Refactor and extract function for last active.
This just done to improves code readability and removes some code too.
2019-08-15 16:54:28 -07:00
Pragati Agrawal c0c11fe226 settings_users: Refactor logic for "last active" column in users table.
This uses "last_active" attribute of `user` (`item`) object and makes code
much more readable.
2019-08-15 16:54:28 -07:00
Pragati Agrawal a3ef8856a8 settings_users: Add last_active to active_users for "users" table.
This is a preliminary step for refactoring the logic for rendering
"last_active" in the users table and later we can use this for sorting the
column.
2019-08-15 16:54:28 -07:00
Pragati Agrawal ba5564fec7 settings_users: Remove `if` condition for showing current user time stamp.
It seems `presence.presence_info[item.user_id]` works fine for the current
user as well and there is no need to hardcode extra condition for the
current user.
2019-08-15 16:54:28 -07:00
Pragati Agrawal 6b5e98d554 settings_panel_menu: Fix the switching behavior for hidden section panels.
For organization settings page there are few sections' panels which are not
visible (unless you click on 'show more') but when we use up-down arrows to
navigate between sections, sections of hidden panels also get visible which
leads to confusion.

Fixes: #13008.
2019-08-15 16:51:19 -07:00
Alexandra Ciobica f7e88fb2c1 css: Add color variables to integrations.scss. 2019-08-15 16:12:15 -07:00
Alexandra Ciobica 43d11285fa css: Add background to integrations categories. 2019-08-15 16:12:15 -07:00
Alexandra Ciobica da9a092d39 css: Refactor integrations to use SCSS nesting.
While refactoring, I tested all the rules and removed the CSS that was
not needed or duplicated.

I removed the `$("#integration-list-link").css('display', 'block');` and
moved it to css because there is no case in which the back link is
hidden.
2019-08-15 16:12:15 -07:00
Alexandra Ciobica 84e0327d10 integrations: Fix arrangement of left sidebar `back to list` button.
I rearranged the elements of the left sidebar in HTML in order to appear
in the order they are displayed and removed the absolute positioning,
because it was not needed if the elements are arranged correctly. I used
`flex` display to arrange them on column.

I removed the styling that positioned the elements absolutely.

Then I tweaked the margins in order to make the elements look good.

Fixes: #12929
2019-08-15 16:12:15 -07:00
Thomas Ip cbae51db63 settings: Move API key form into its own modal.
The modal is rendered dynamically to avoid password managers
inserting passwords into the input field too aggressively.

Fixes #12523.
2019-08-14 10:50:45 -07:00
Thomas Ip 75db8fecf8 refactor: Remove redundant dataType option to channel.post(). 2019-08-14 10:50:45 -07:00
Akash Nimare 2e47e35edc desktop: Update desktop app to v4.0.0. 2019-08-13 12:36:40 -07:00
Wyatt Hoodes f623540409 data export: Add UI to trigger data export.
This commit serves as the frontend piece for the "public export"
webapp feature.

Fixes: #11930
2019-08-12 18:21:38 -07:00
Alexandra Ciobica 4c08a840d0 accounts/go: Change class of bottom text to be consistent.
I changed the class of the two bottom texts to use the same styling as
(`/new` and `/complete/github`)
2019-08-08 11:12:51 -07:00
Alexandra Ciobica 196185db03 css: Remove unused css from register page.
After removing the `bottom-text` from `new organization`, this css from
the register page is not used anymore.
2019-08-08 11:12:51 -07:00
Alexandra Ciobica eb6c5e1962 auth: Style the GitHub auth email selection page.
I added the `white-box` as it was in the other similar pages
(`/accounts/go`).

In order to be able to style it better, I removed the buttons and added
`div`s instead, then added click handler for submitting the form.

If the email is associated to a Zulip account, the avatar of the account
is displayed and the text `Log in`, otherwize a `+` sign is
displayed and the text `Create new account`.
2019-08-08 11:12:51 -07:00
Alexandra Ciobica e5e45c9a25 auth: Change page title and add description for the list.
I changed the class of the title in order to use the same styling as the
 other similar pages (like `/accounts/go` or `/login`).

Changed the related test.
2019-08-08 11:12:51 -07:00
Vaibhav aa29ef0317 css: Use SCSS nesting for 700px media queries in subscriptions.scss. 2019-08-07 17:42:10 -07:00
Vaibhav 5aa22f4acd css: Reorder so `.subscriptions-container` are in same place. 2019-08-07 17:42:10 -07:00
Vaibhav 7019b8a4c6 css: Use SCSS nesting in subscriptions.scss media queries. 2019-08-07 17:42:10 -07:00
Vaibhav 1b1e74bc24 css: Use SCSS nesting for `ul.grey-box`. 2019-08-07 17:42:10 -07:00
Anders Kaseorg c3a83a82c5 echo: Consistently send local_id as string, convert it back to number.
Fixes: #2734.

`local_id` was being transmitted to the server as a string by the AJAX
transmission path, and as a number by by the WebSocket transmission
path.  Then, one of the two racing success callback paths would use
the original number, while the other would use the type returned by
the server.  Depending on which transmission path was used and which
callback path won the race, `reify_message_id` would sometimes be
passed a string that would fail to compare equal to the numerical
selection id.  If the locally echoed message was selected, this would
cause the selection to disappear.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-07 17:17:25 -07:00
Vaibhav 30af846095 css: Use SCSS nesting for `.poll-edit-question`. 2019-08-07 17:16:49 -07:00
Vaibhav 241015e3e6 css: Use SCSS nesting for `.poll-question-*`. 2019-08-07 17:16:49 -07:00
Vaibhav 1fb5e36e7a css: Use SCSS nesting for button.task*. 2019-08-07 17:16:49 -07:00
Vaibhav 911e438a14 css: Use SCSS nesting for add-task, poll-question and poll-option. 2019-08-07 17:16:49 -07:00
Vaibhav 6f0f4647ec css: Nest `.poll-vote` inside `.poll-widget`. 2019-08-07 17:16:49 -07:00
Vaibhav 13293c702e css: Use SCSS nesting for `.poll-vote`. 2019-08-07 17:16:49 -07:00
Vaibhav 7b77cc936a css: Reorder widgets.scss so `.poll-vote` are in same place. 2019-08-07 17:16:49 -07:00
Vaibhav 39b1665237 css: Use SCSS nesting for `.poll-widget`, `.todo-widget`. 2019-08-07 17:16:49 -07:00
Vaibhav 11b2748bce css: Nest `.widget-choices-heading` inside `.widget-choices`. 2019-08-07 17:16:49 -07:00
Vaibhav 27223b258d css: Use SCSS nesting for `.widget-choices`. 2019-08-07 17:16:49 -07:00
Vinit Singh a2f9211384 message_view: Show edit history when EDITED notice is clicked.
Open the edit history of a message when a user clicks on it's
EDITED notice.
Also, added on-hover darkening for the EDITED notice.

Resolves #12615.
2019-08-07 16:59:24 -07:00
vinitS101 3d01921e1a user status: Changes to Last active field of Full User Profile.
If a user was active within the last 90 days,
show number of days (23 Days ago).
If the user was active more than 90 days ago and in the same year,
then show MMM DD (Mar 15).
In any other case show MMM DD YYYY (Nov 10 2018),
Change timerender.js test to accomodate changes.
2019-08-07 16:20:19 -07:00
vinitS101 232f588d4e user status: Change Online now to Active now in full user profile.
Change "Online now" to "Active now" in Last seen field of
full user profile.
2019-08-07 16:20:19 -07:00
vinitS101 a82ad468f9 user status: Change Last online to Last active.
Change "Last online" to "Last active" in the full user profile.
2019-08-07 16:20:19 -07:00
Anders Kaseorg becef760bf cleanup: Delete leading newlines.
Previous cleanups (mostly the removals of Python __future__ imports)
were done in a way that introduced leading newlines.  Delete leading
newlines from all files, except static/assets/zulip-emoji/NOTICE,
which is a verbatim copy of the Apache 2.0 license.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-06 23:29:11 -07:00
Rishi Gupta a0ebd9276d portico: Fix bug with .warn on /integrations.
Was causing an extra 10px of margin-top on .warn.

In general styles applied to .tip and .keyboard-tip should also be applied
to .warn.
2019-08-05 17:33:05 -07:00
Rishi Gupta bc220aefdf help: Document topic links. 2019-08-02 16:33:27 -07:00
Rishi Gupta 3fbd0026a4 compose: Update topic list tip_text.
It was a bit confusing to have this appear even after you typed `>`.

Also, removed the word "mention", since mention has a specific meaning in
Zulip.
2019-08-02 16:33:27 -07:00
Pragati Agrawal 5b324e50ca users: Apply email_address_visibility policy on the users list.
In the emails-hidden case, for non-admins, we should remove the email
field from "Users" list in the organization settings page.

Tweaked by tabbott to correctly handle the bots and deactivated users pages.
2019-08-02 15:28:36 -07:00
Pragati Agrawal ac2f1cea9c settings_org: Enhance `show_emails` for admins only case too.
This adds on the `is_admin` clause to show_emails.
2019-08-02 15:20:55 -07:00
Rohitt Vashishtha a7f2bedb15 markdown: Enable hashheadings syntax.
Our implementation requires at least 1 space after the
'#' not not break existing linkifiers like '#123', etc.
that generally follow the convention we show in linkifier
examples.

- [valid]  : # Hello
- [valid]  : #  Hello
- [invalid]: #Hello

For the frontend, we have taken the code from v0.7.0 of
upstream marked and made minor changes to avoid having
to refactor a significant part of our marked code.

For the backend, we merely have to change the regex to
force require spaces after #, and add hashheader to our
list of blockparsers.

Fixes #11418.
2019-08-02 15:15:34 -07:00
Tim Abbott e807041bda compose_ui: Fix double escaping of compose placeholder text.
This fixes an issue where we were accidentally double-escaping the
compose placeholder text if it contained HTML entities; once in
`i18n.t` and again when inserting it into the `placeholder` DOM via
`.attr`.
2019-08-01 12:59:07 -07:00
Rohitt Vashishtha bb46bc099b typeahead: Show header text for some mentions.
Show help text when completing stream, topic, mention and silent_mention.
2019-07-31 15:36:15 -07:00
Rohitt Vashishtha 6c34d99ad0 typeahead: Add header text to show info about current completion.
We can provide a function that returns an HTML string: `this.header()` to
display a header text above the typeahead. This can be used to provide
contextual information such as hinting about the silent mentions syntax
or the topic mentions syntax.

At the end of this commit, the HTML structure is:

$container <div>
  $header <p>
    info-icon
    header-text
  $menu <ul>
    list-items
2019-07-31 15:33:27 -07:00
Rohitt Vashishtha b071270788 typeahead: Add a container div for the typeahead list.
This change allows us to add custom changes to the HTML generated
by the typeahead without interfering with the core functions that
are provided by the library.

At the end of this commit, the HTML structure is:

$container <div>
  $menu <ul>
    list-items
2019-07-31 15:33:27 -07:00
Tim Abbott 38ffde37e5 css: Move edit history highlighting CSS into rendered_markdown. 2019-07-31 12:08:17 -07:00
Tim Abbott 28fc159d24 css: Move more embed CSS into rendered_markdown. 2019-07-31 12:08:17 -07:00
Tim Abbott 4fbc74bb0b css: Delete custom CSS for message-edit-history.
This logic effectively badly duplicated the existing rendered_markdown
CSS.
2019-07-31 12:08:17 -07:00
Tim Abbott ba66dfe977 css: Scope KaTeX CSS inside rendered_markdown.
This is entirely for readability.
2019-07-31 12:08:17 -07:00
Tim Abbott 5b732437c1 css: Scope mentions and alert words in rendered_markdown. 2019-07-31 12:08:17 -07:00
Tim Abbott 97b256d1f0 css: Extract rendered_markdown.scss.
This moves our main CSS for rendered Zulip message content into an
external file, which may be reusable but in any case should make it
easier to find this content.
2019-07-31 12:08:17 -07:00
YashRE42 7a6f4630dc compose_box: Prepopulate stream if possible.
When users are only subbed to a single stream, this autofills the stream
field of the compose box.
Fixes #12507.
2019-07-31 10:20:24 -07:00
Tim Abbott fac886ce05 Revert "compose: Fix cursor placement timing bug when selecting a typeahead."
This reverts commit 76e50af78e.

Empirically, this caused weird issues with the cursor jumping around,
so more investigation is required into the right way to fix it.
2019-07-29 18:05:46 -07:00
Vinit Singh 03180752db compose: Update placeholder text depending on the narrow.
Change the `compose-textarea` placeholder text depending on the
stream/topic or PM recipients that the message will be sent to.

Resolves #12834.
2019-07-29 15:51:50 -07:00
Yashashvi Dave 865a7204f9 custom fields: Set generic click handler on remove_date buttons.
This commit adds click handler on date type custom profile
fields on field initialization itself.
This commit also fixes the bug in date type fields in user
profile in org settings.
2019-07-29 15:06:35 -07:00
Yashashvi Dave b93ca2fc50 custom fields: Hide remove_date button for none value date fields.
This commit adds a click handler on datepicker custom profile
fields, which hides the `remove_date` button if the field value
is not set.

Fixes part of #11453
2019-07-29 15:06:35 -07:00
Yashashvi Dave 2e8cf6984e user settings: Fix click handler errors on datepicker profile field.
On change value click handlers on user profile fields in user settings
were also initialized on profile fields in org settings -> users
section. In org settings -> users, we do not need on change value
click handlers.
This commit fixes above issue by setting up handlers only on
user settings page.
2019-07-29 15:06:35 -07:00
Yashashvi Dave 440975e369 org settings: Fix background color in custom user profile datepicker field.
Fixes part of #11453
2019-07-29 15:06:35 -07:00
Anders Kaseorg 29c5b63e64 css: Fix .message_top_line stealing mouse events from .message_edit_form.
This is a replacement for the workaround removed by commit
2273608477.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-25 17:55:34 -07:00
Anders Kaseorg f0e0fe1c15 ui.get_scroll_element: Set up SimpleBar if it’s expected but missing.
Although SimpleBar automatically sets itself up on elements with a
`data-simplebar` attribute, sometimes we try to set event listeners
before that happens.  Create the SimpleBar early in that case.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-25 16:18:54 -07:00
Vaibhav 2fd0753d22 reactions_button: Remove title from reaction button in controls.
Since the button already has a tooltip, we can remove the title.
2019-07-25 16:13:19 -07:00
Alexandra Ciobica 13bdc655c9 css: Fix `ol`s on integrations.
Apparently, the 30px width we allocated to the bullets was
insufficient with the larger font size there.

Edit by tabbott: better to just increase it to 32px everywhere.
2019-07-25 15:08:07 -07:00
Alexandra Ciobica 999209020f portico: Move `code-section` rules to `markdown.scss`.
`code-section` is a feature of the markdown system, therefore the
associated CSS should be in the `markdown.scss` file. I also refactored
to use SCSS nesting.
2019-07-25 15:04:09 -07:00
Alexandra Ciobica 8fef764960 css: Make help page height selector from 500px viewport more specific. 2019-07-25 15:04:09 -07:00
Alexandra Ciobica 428a5c0d26 css: Change `font-size` of markdown text on why-zulip and integrations. 2019-07-25 15:04:09 -07:00
Alexandra Ciobica 4e29721385 css: Remove duplicated css rules.
These rules are no longer needed after the addition of `.markdown` class
 on the `why-zulip` pages.
2019-07-25 15:04:09 -07:00
Alexandra Ciobica 295cbc8535 css: Refactor `markdown.scss` to use SCSS nesting. 2019-07-25 15:04:09 -07:00
Alexandra Ciobica 7a22111601 css: Move markdown CSS into separate file. 2019-07-25 15:04:09 -07:00
Alexandra Ciobica d2466e15cb css: Remove duplicated `integrations` selectors and fix styling.
I added the `@media (max-width: 500px)` because the text from the inner
content was gong outside the white background on mobile because of the
height of the `.markdown` class for this viewport.

I moved this `.integration-instructions .help-content h3 { margin: 20px
0 ; }` from the `portico.scss` because it should be in `integrations
.scss`.

I removed the `#hubot-integrations` because I didn't find that id
anywhere.

I removed `.portico-landing.integrations ol ul` because `.markdown`
takes care of that left spacing.
2019-07-25 15:04:09 -07:00
Alexandra Ciobica 93c98e6d9a css: Remove duplicated selectors from `why-zulip`. 2019-07-25 15:04:09 -07:00
Rohitt Vashishtha 76e50af78e compose: Fix cursor placement timing bug when selecting a typeahead.
When you press enter on a typeahead and start typing, your cursor is
placed at the end of the textbox, whereas we want it to be placed at
the end of the typeahead immediately. This causes some characters to
appear at the end of the message before you again get to typing from
where you left off.

To fix, we use the change event triggered on typeahead completion to
reposition the cursor instead of using a setTimeout().

Fixes #12621.
2019-07-25 15:01:24 -07:00
Yashashvi Dave 3f28f4a9f5 static/templates/stream_settings_checkbox: Simplify handlebar logic.
Fixes #12801
2019-07-25 14:56:12 -07:00
Yashashvi Dave 307ef2e96d static/templates/emoji_popover_emoji: Fix typo. 2019-07-25 14:56:12 -07:00
Rohitt Vashishtha 4f03d82ff0 compose: Do not trigger topic mention if already completed. 2019-07-25 14:53:43 -07:00
Vaibhav 6bd6b846a5 css: Reorder subscriptions.scss so `.large-icon` are in same place. 2019-07-25 14:44:58 -07:00
Vaibhav 36b78b034b css: Remove redundant rules from `.large-icon.hash`. 2019-07-25 14:44:58 -07:00
Vaibhav 350bcbea80 css: Use SCSS nesting for `#subscriptions_overlay`. 2019-07-25 14:44:58 -07:00
Vaibhav 86bff0c3ce css: Nest elements inside `#subscription_overlay`. 2019-07-25 14:44:58 -07:00
Vaibhav 37f70adeb6 css: Use SCSS nesting for `.editable-section`. 2019-07-25 14:44:58 -07:00
Vaibhav 4c70a23d43 css: Nest `#stream_creation_form` inside `#stream-creation`. 2019-07-25 14:44:58 -07:00
Vaibhav 4886f3b8f0 css: Use SCSS nesting for `#stream_creation_form`. 2019-07-25 14:44:58 -07:00
Vaibhav dd6494343a css: Use SCSS nesting for `#stream-creation`. 2019-07-25 14:44:58 -07:00
Vaibhav bd7fc23d30 css: Nest elements inside `#subscription_overlay #stream_creation`. 2019-07-25 14:44:58 -07:00
Vaibhav 4fc3878b00 css: Use SCSS nesting for `.stream-creation-body`. 2019-07-25 14:44:58 -07:00
Vaibhav 6a840e39f6 css: Nest `#announce-new-stream` inside `.stream-creation-body`. 2019-07-25 14:44:58 -07:00
Vaibhav 33bc11980d css: Use SCSS nesting for `.create_stream_button`. 2019-07-25 14:44:58 -07:00
Yashashvi Dave e55afc2629 user settings: Update alert message element in change-full-name modal. 2019-07-25 13:33:44 -07:00
Yashashvi Dave e1dacb99df user settings: Update alert message element in change-email modal. 2019-07-25 13:33:44 -07:00
Yashashvi Dave b3b480709d user settings: Update alert-msg-elem in change password modal. 2019-07-25 13:33:44 -07:00
Yashashvi Dave 4860904284 user setting: Update user display message for setting change-email. 2019-07-25 13:33:44 -07:00
Yashashvi Dave 916a84ce20 overlays: Remove all alert notifications from in open_modal func.
We should not display any alert previous notification on
open_modal() functions.
2019-07-25 13:33:44 -07:00
Yashashvi Dave 5506b16fa8 user settings: Add separate alert-save widget for profile custom fields.
Fixes part of #12748
2019-07-25 13:33:44 -07:00
Yashashvi Dave 3c16b73fcd account settings: Simplify handlebars conditional logics.
This commit simplifies complex handlebars conditional
logic for account settings tooltips and fields.
2019-07-25 13:33:44 -07:00
Anders Kaseorg 2ac944c31f css: Remove message_hovered class.
This appears to have been dead for years.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-23 17:54:12 -07:00