Commit Graph

18808 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan
c787254427
DEV: Remove code that is no longer used (#17684) 2022-07-27 16:42:16 +08:00
Alan Guo Xiang Tan
3682513475
FIX: Sidebar is always disabled on wizard route (#17682) 2022-07-27 15:17:20 +08:00
Alan Guo Xiang Tan
3bd5f2d411
DEV: Introduce SiteSetting to enable/disable Sidebar. (#17662)
This commit removes the ability to enable/disable the Sidebar on a per
user basis and introduces a site wide setting. For testing purposes, sidebar can be enabled/disabled via the `enable_sidebar=1` or `enable_sidebar=0` query param.
2022-07-27 13:42:26 +08:00
Alan Guo Xiang Tan
41aa7fa4ef
DEV: Fix mini profiler queries bg covering results (#17679) 2022-07-27 11:41:13 +08:00
Kris
126266863d
UX: sidebar transition and styling adjustments (#17678) 2022-07-26 23:16:34 -04:00
Arpit Jalan
10f200a5d3
FEATURE: revamped wizard (#17477)
* FEATURE: revamped wizard

* UX: Wizard redesign (#17381)

* UX: Step 1-2

* swap out images

* UX: Finalize all steps

* UX: mobile

* UX: Fix test

* more test

* DEV: remove unneeded wizard components

* DEV: fix wizard tests

* DEV: update rails tests for new wizard

* Remove empty hbs files that were created because of rebase

* Fixes for rebase

* Fix wizard image link

* More rebase fixes

* Fix rails tests

* FIX: Update preview for new color schemes: (#17481)

* UX: make layout more responsive, update images

* fix typo

* DEV: move discourse logo svg to template only component

* DEV: formatting improvements

* Remove unneeded files

* Add tests for privacy step

* Fix banner image height for step "ready"

Co-authored-by: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com>
Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2022-07-27 06:53:01 +05:30
David Taylor
6146a9b448
FIX: Ensure uploads work when the user's browser rewrites ellipsis (#17671)
https://meta.discourse.org/t/cannot-upload-images-with-safari/232563
2022-07-26 21:43:39 +01:00
Penar Musaraj
7592754c90
FIX: Allow users to quote in closed topics (#17645)
Previously, non-staff users could only quote if they had an open composer.

This change shows the quote control when selecting text in closed topics
at all times and if the composer isn't already open, it will default to
creating a linked topic.
2022-07-26 15:45:34 -04:00
Kris
b5c1132546
UX: add bulk-select to mobile topic lists (#15386) 2022-07-26 15:36:35 -04:00
David Taylor
3960ba6588
FIX: Ensure admin templates are not used for non-admin controllers (#17667)
Previously, if a non-admin controller did not have a template defined, then the resolver would return an admin template with the same name. This is not the desired behavior, and regressed in fc36ac6cde. However, we *do* want this behavior for components defined in the admin bundle (because admin components are not namespaced).

This was noticed because the non-admin `badges` route was using the `admin/badges` template

This commit fixes the behavior, and adds a tests for these cases.
2022-07-26 17:03:49 +01:00
Bianca Nenciu
171789f47a
FIX: Make sure user list is complete and sorted (#17616)
Sometimes the user list was incomplete when multiple requests were
created to fetch next pages. If the responses did not arrive in the
same order as the requests then only the last response was parsed.

This is a follow up commit to a0f4c7fe88.
2022-07-26 17:54:52 +03:00
Andrei Prigorshnev
47917c0be4
FIX: make sure every user instance has correct status tracking counter 2022-07-26 18:42:55 +04:00
David Taylor
fccbe5c604
UX: Replace site-settings link with "Admin" link in sidebar (#17665)
The main landing page for admins/mods should be the admin Dashboard, not the site settings. Having a "Settings" link can be confused with user settings.

This commit also displays the button for moderators, who are also allowed access to parts of the admin dashboard)
2022-07-26 14:46:33 +01:00
Andrei Prigorshnev
517e2f7dc4
FIX: handle correctly the case when several subscribers call trackStatus() on the user model (#17497) 2022-07-26 15:28:26 +04:00
David Taylor
17e733b6a8
DEV: Add optional timezone support to date-time-input-range (#17654)
This allows consumers to pass in, and receive, timestamps for a different timezone. Previously, attempting this would lead to very strange behavior which would become worse the further the input timestamp's timezone was from the browser's timezone.

The default behavior is unchanged - the browser's timezone will be assumed.
2022-07-26 11:14:22 +01:00
Krzysztof Kotlarek
3bfc254c4e
FIX: correct mention paths in fixtures (#17660)
Our mention path are `/u/:username` and not `/users/:username`. Test fixtures should have those values correct as well.
2022-07-26 10:09:05 +08:00
Joe
994ca8f6de
FIX: Linear gradient with stops makes R2 confused (#17650)
Context: https://meta.discourse.org/t/the-theme-is-broken-in-right-to-left-languages-even-in-meta/233908

We use the R2 gem to do the magic RTL CSS conversion. There are cases where we feed it too much, and it gets confused. The issue here is that we use a linear gradient with CSS variables, an RGBA function, and we set the stops.

This makes R2 choke and causes it to return jumbled CSS, which means that any CSS that comes after that rule is junk and doesn't apply.

This PR removes the stops from the gradient. This shouldn't cause any visual changes since these are the default stops.

More explanation of the issue here: https://meta.discourse.org/t/user-card-will-not-open-on-the-mobile/171268/6?u=johani
2022-07-26 03:03:02 +08:00
Kris
4cb428ef83
UX: make sidebar hamburger menu occupy full width (#17649) 2022-07-25 14:18:57 -04:00
Kris
235878033e
UX: only transition header on sidebar toggle (#17646) 2022-07-25 13:27:56 -04:00
Jean
424a274c12
FEATURE: add categories page style to order topics by created date (#17500) 2022-07-25 09:41:43 -04:00
Osama Sayegh
9103081eb7
DEV: Add likes, mentions and replies tabs to the new user menu (#17623)
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
2022-07-25 15:19:53 +03:00
Joffrey JAFFEUX
43b8cfeae3
FIX: improves handling of filter with invalid tag chars (#17640)
Tags mixin is already filtering a lot of data from the user submitted filter in `createContentFromInput()` which can lead to sk receiving an empty filter while the input actually has a value.
2022-07-25 12:00:52 +02:00
Alan Guo Xiang Tan
1dff3ad79d
FIX: Title for keyboard shortcuts button in sidebar (#17638) 2022-07-25 15:47:39 +08:00
Alan Guo Xiang Tan
07424b9bb6
UX: Docking/undocking sidebar toggles sidebar hamburger dropdown (#17636)
Before this change, undocking the sidebar would just hide the sidebar
from the screen which led people to complain that they "lost" their
sidebar and had to "find" it. With this change, we automatically display
the sidebar hamburger dropdown when you undock the sidebar. Like wise
when the sidebar is docked, the sidebar hamburger dropdown is
automatically collapsed.
2022-07-25 14:45:16 +08:00
Krzysztof Kotlarek
228c14479b
DEV: expose decorateUsername function (#17637)
Expose `decorateUsername` function to make it usable in controllers or plugin initializers.
2022-07-25 14:43:54 +08:00
Jarek Radosz
10fa1cafb1
DEV: Remove yet another jQ use in tests (#17628) 2022-07-25 02:32:04 +02:00
Jarek Radosz
b179fb98b1
DEV: Consistently use response helper (#17627) 2022-07-25 02:31:52 +02:00
Jarek Radosz
6cae26c499
DEV: Always await for publishToMessageBus (#17626)
(+ typos)
2022-07-24 19:55:58 +02:00
Jarek Radosz
ff16ba1fc0
DEV: Update @embroider/test-setup (#17625) 2022-07-24 17:29:21 +02:00
Kris
edb931e7e5
UX: let hamburger-sidebar restrict child width (#17614) 2022-07-22 10:26:13 -04:00
Joe
9424cfd9b8
UX: Prevent jitter in some onebox images (#17611)
Internal topic

/t/-/70486/9
2022-07-22 17:14:28 +08:00
Alan Guo Xiang Tan
49d4f7c066
FEATURE: Add users and groups links to community section in sidebar (#17609) 2022-07-22 16:00:06 +08:00
Alan Guo Xiang Tan
b4b339b059
UX: Properly size emoji in sidebar section link text (#17610) 2022-07-22 15:58:21 +08:00
Alan Guo Xiang Tan
a626b99a50
UX: Remove bookmarks link from community section (#17608)
Product decision to drop it from Sidebar at this moment.
2022-07-22 15:55:13 +08:00
Alan Guo Xiang Tan
4594ce2723
UX: Rename Sidebar 'Topics' section to 'Community' (#17605)
Product decision to rename as not all links under the section falls
under the topics umbrella
2022-07-22 15:20:01 +08:00
Alan Guo Xiang Tan
852057a25a
UX: Set width on hamburger menu drop down to prevent overflow (#17607) 2022-07-22 15:02:30 +08:00
Alan Guo Xiang Tan
972e51e808
DEV: Fix failing spec due to cf5e59928e (#17606) 2022-07-22 14:50:31 +08:00
Alan Guo Xiang Tan
cf5e59928e
UX: Only hide section header icons when sidebar is pinned on Desktop (#17604) 2022-07-22 14:27:46 +08:00
Alan Guo Xiang Tan
99073338de
FEATURE: Replace hamburger dropdown with Sidebar when undock (#17600)
When the experimental Sidebar is enabled, the hamburger drop down is replaced by a sidebar drop down. A user is given the ability to dock and undock the sidebar depending on their personal preference.

Do also note that the experimental sidebar is well, considered experimental at this point so I do not intend for the features here to be perfect. What I aim to do here is to ship the changes fast so that it can be used internally by the team to provide feedback. Custom links added by plugins and dark mode toggle has not been implemented as part of this commit as I aim to tackle it in another commit.

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2022-07-22 13:06:47 +08:00
Alan Guo Xiang Tan
71eb8d2e8e
DEV: Support models argument for custom sidebar section link API (#17602)
* DEV: Improve documentation for custom sidebar section interfaces

* DEV: Improvements to sidebar custom section plugin API tests

* DEV: Support models argument for custom sidebar section link API
2022-07-22 12:06:21 +08:00
Alan Guo Xiang Tan
ad7d72cea7
DEV: Remove reference to discourse chat in core (#17601) 2022-07-22 11:15:43 +08:00
Osama Sayegh
6b8d635943
DEV: Add implementations for various notification types for the new user menu (#17589)
This commit is a subset of the changes proposed in https://github.com/discourse/discourse/pull/17379.
2022-07-22 05:07:32 +03:00
David Taylor
98bacbd2c6
DEV: Use RenderGlimmer for experimental user menu (#17597)
`RenderGlimmer` means we can now drop the classic-component wrapper. The old `didInsertElement` hook is reimplemented via the `did-insert` modifier.
2022-07-21 19:38:07 +01:00
David Taylor
6c5efb61c9
DEV: Introduce RenderGlimmer helper for use in widgets (#17592)
This allows an arbitrary Glimmer template to be rendered inside a Widget. That template can include any kind content, including Classic Ember components and Glimmer components. This leans on Ember's official `{{#in-element}}` helper which means that all component lifecycle hooks are called correctly.

This is a modern replacement for our existing `ComponentConnector` implementation. We'll deprecate `ComponentConnector` in the near future.

Example usage:

```javascript
// (inside an existing widget)
html(){
  return [
    new RenderGlimmer(
      this,
      "div.my-wrapper-class",
      hbs`<MyComponent @arg1={{@data.arg1}} />`,
      {
        arg1: "some argument value"
      }
    ),
  ]
}
```

See `widgets/render-glimmer.js` for documentation, and `render-glimmer-test` for more example uses.
2022-07-21 18:58:52 +01:00
David Taylor
327dd0beb3
DEV: Install ember-modifier and @ember/render-modifiers (#17595)
`ember-modifier` provides APIs to write our own modifiers. `@ember/render-modifiers` provides some simple `did-insert`, `did-update` and `will-destroy` modifiers.

Upcoming `ember-modifier` deprecations have been set to 'throw' in our deprecation-workflow config to ensure we don't accidently start using deprecated behaviour.
2022-07-21 18:12:29 +01:00
Jarek Radosz
cb40e4c322
DEV: Use a separate KVS namespace for tests (#17591) 2022-07-21 15:27:24 +02:00
Jarek Radosz
331874229e
DEV: Fix pretender leaking request handlers (#17584) 2022-07-21 11:28:08 +02:00
Jarek Radosz
e509c54b4c
DEV: Randomize tests order in more cases (#17588)
Previously it would randomize the order only when running tests:

1 .through ember-exam
2. in browser, with no params

Running just core tests, or just plugins, or a single plugin, or with filter, etc. disabled randomization.

Now all those cases are covered.
2022-07-21 03:50:32 +02:00
Bianca Nenciu
7a668460e0
FIX: Make group members bulk operations consistent (#17561)
This commit improves several parts of the group members bulk operation.
It fixes the bug that did not show the menu button when the Select all
button was clicked. The other changes make the behavior more consistent
with topic list bulk operations.
2022-07-20 16:54:21 +03:00
Krzysztof Kotlarek
8dd0f8a712
FIX: pass sidebar custom link willDestroy (#17565)
Custom sidebar link willDestroy function has to be passed to SidebarLink component to call when component is removed.

Very similar to https://github.com/discourse/discourse/pull/17551
2022-07-20 13:44:13 +10:00