Commit Graph

8407 Commits

Author SHA1 Message Date
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 ols 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