Commit Graph

235 Commits

Author SHA1 Message Date
chapoi
0ce0bcd8ff
Remove border radius from chat (#22437)
* add border-radius-large variable

* UX: replace chat border-radius with variable
2023-07-10 15:07:38 +02:00
Kris
4cec091f1a
REFACTOR: improve poll info layout (#22353) 2023-07-05 12:20:18 -04:00
Kris
7958f57174
UX: softer dropdown and menu panel shadows (#22114) 2023-06-15 10:52:51 -04:00
Kris
e0f848c2ea
REFACTOR: move shadow vars to css custom props (#22094) 2023-06-13 16:38:31 -04:00
Kris
5ed24bc8a1
UX: dark color palettes need darker shadows (#22051) 2023-06-12 10:15:14 -04:00
Kris
ae8347d948
UX: minor #mention style adjustments (#22048) 2023-06-09 15:08:54 -04:00
Kris
2aae8d6092
UX: increase sidebar font-size (#21704) 2023-05-24 11:00:20 -04:00
Jordan Vidrine
984a616204
Button research (#21621) 2023-05-22 16:03:34 -05:00
chapoi
1372c5c435
UX: onebox/blockquote/chatreaction slight accent colour change (#21252) 2023-04-26 15:11:20 +02:00
Kris
1c64b2dd95
UX: allow sidebar to appear inline down to 768px (#20271)
* UX: allow sidebar to appear inline down to 768px

* test fix

* fix typos
2023-02-14 09:51:42 +11:00
Rafael dos Santos Silva
6e522e4aad
DEV: Move to Sass compilation to dart-sass (#19910)
This PR is a major change to Sass compilation in Discourse.

The new version of sass-ruby moves to dart-sass putting we back on the supported version of Sass. It does so while keeping compatibility with the existing method signatures, so minimal change is needed in Discourse for this change.

This moves us

From:
  - sassc 2.0.1 (Feb 2019)
  - libsass 3.5.2 (May 2018)

To:
  - dart-sass 1.58

This update applies the following breaking changes:

> 
> These breaking changes are coming soon or have recently been released:
> 
>  [Functions are stricter about which units they allow](https://sass-lang.com/documentation/breaking-changes/function-units) beginning in Dart Sass 1.32.0.
> 
>  [Selectors with invalid combinators are invalid](https://sass-lang.com/documentation/breaking-changes/bogus-combinators) beginning in Dart Sass 1.54.0.
> 
>  [/ is changing from a division operation to a list separator](https://sass-lang.com/documentation/breaking-changes/slash-div) beginning in Dart Sass 1.33.0.
> 
>  [Parsing the special syntax of @-moz-document will be invalid](https://sass-lang.com/documentation/breaking-changes/moz-document) beginning in Dart Sass 1.7.2.
> 
>  [Compound selectors could not be extended](https://sass-lang.com/documentation/breaking-changes/extend-compound) in Dart Sass 1.0.0 and Ruby Sass 4.0.0.


SCSS files have been migrated automatically using `sass-migrator division app/assets/stylesheets/**/*.scss`
2023-02-07 12:24:57 -03:00
chapoi
e03f6057ec
UX: Highlight var refactor (#20026)
* Add new color vars

* Select-kit > use new color vars

* update all color schemes with values for new hover/select vars

* Add variable yml names
2023-01-27 15:50:36 +01:00
chapoi
6f9843803d
UX: add new boxshadow variation (#19450) 2022-12-14 12:35:23 +01:00
chapoi
211700bc5c
UX: change highlight colour (#19451) 2022-12-14 07:14:28 +08:00
Kris
07e4b7550d
DEV: relocate :root CSS custom properties (#19389) 2022-12-09 14:33:15 -05:00
Kris
6d1de26279
UX: refactor & update small post styles (#19274) 2022-12-05 09:54:29 -05:00
Kris
6b7bdc991d
UX: improve mention styling, simplify (#19169)
* UX: improve mention styling, simplify

* revert default
2022-11-24 09:35:57 +11:00
Kris
b0f380c4c7
UX: improve mention styling (#19156)
This updates mention styling. This reduces bold, increases contrast, and makes inactive mentions look more inactive.
2022-11-23 09:17:03 +10:00
Martin Brennan
d3f02a1270
FEATURE: Generic hashtag autocomplete lookup and markdown cooking (#18937)
This commit fleshes out and adds functionality for the new `#hashtag` search and
lookup system, still hidden behind the `enable_experimental_hashtag_autocomplete`
feature flag.

**Serverside**

We have two plugin API registration methods that are used to define data sources
(`register_hashtag_data_source`) and hashtag result type priorities depending on
the context (`register_hashtag_type_in_context`). Reading the comments in plugin.rb
should make it clear what these are doing. Reading the `HashtagAutocompleteService`
in full will likely help a lot as well.

Each data source is responsible for providing its own **lookup** and **search**
method that returns hashtag results based on the arguments provided. For example,
the category hashtag data source has to take into account parent categories and
how they relate, and each data source has to define their own icon to use for the
hashtag, and so on.

The `Site` serializer has two new attributes that source data from `HashtagAutocompleteService`.
There is `hashtag_icons` that is just a simple array of all the different icons that
can be used for allowlisting in our markdown pipeline, and there is `hashtag_context_configurations`
that is used to store the type priority orders for each registered context.

When sending emails, we cannot render the SVG icons for hashtags, so
we need to change the HTML hashtags to the normal `#hashtag` text.

**Markdown**

The `hashtag-autocomplete.js` file is where I have added the new `hashtag-autocomplete`
markdown rule, and like all of our rules this is used to cook the raw text on both the clientside
and on the serverside using MiniRacer. Only on the server side do we actually reach out to
the database with the `hashtagLookup` function, on the clientside we just render a plainer
version of the hashtag HTML. Only in the composer preview do we do further lookups based
on this.

This rule is the first one (that I can find) that uses the `currentUser` based on a passed
in `user_id` for guardian checks in markdown rendering code. This is the `last_editor_id`
for both the post and chat message. In some cases we need to cook without a user present,
so the `Discourse.system_user` is used in this case.

**Chat Channels**

This also contains the changes required for chat so that chat channels can be used
as a data source for hashtag searches and lookups. This data source will only be
used when `enable_experimental_hashtag_autocomplete` is `true`, so we don't have
to worry about channel results suddenly turning up.

------

**Known Rough Edges**

- Onebox excerpts will not render the icon svg/use tags, I plan to address that in a follow up PR
- Selecting a hashtag + pressing the Quote button will result in weird behaviour, I plan to address that in a follow up PR
- Mixed hashtag contexts for hashtags without a type suffix will not work correctly, e.g. #ux which is both a category and a channel slug will resolve to a category when used inside a post or within a [chat] transcript in that post. Users can get around this manually by adding the correct suffix, for example ::channel. We may get to this at some point in future
- Icons will not show for the hashtags in emails since SVG support is so terrible in email (this is not likely to be resolved, but still noting for posterity)
- Additional refinements and review fixes wil
2022-11-21 08:37:06 +10:00
Kris
19ec341bce
DEV: allow themes to more easily set border-radii (#19037) 2022-11-16 11:35:09 -05:00
Kris
d0f88da9c9
FEATURE: control topic width with variables (#18743) 2022-10-25 14:45:37 -04:00
chapoi
da9ce77ffd
UX: danger colour update (#18516)
* UX: danger colour update

* Update test
2022-10-12 19:01:01 +02:00
Jarek Radosz
4170b9bb58
DEV: Use more css vars (#18561)
Followup to #18518

This time it's mostly line-height vars and a couple of other uncommon vars.
2022-10-12 16:05:42 +02:00
Penar Musaraj
cc4af80c7d
DEV: refactor bootbox alerts (#18292) 2022-09-27 14:47:13 -04:00
Jarek Radosz
87f8bafa7e
DEV: Remove obsolete CSS prefixes (#18262) 2022-09-15 16:54:08 +02:00
Jarek Radosz
658eedeaa7
UX: Avoid showing text cursor on unselectables (#18261) 2022-09-15 15:56:45 +02:00
Jarek Radosz
1284d746b0
DEV: Remove progid:DXImageTransform (#18017) 2022-08-21 09:17:58 +02:00
Kris
a24bcceb19
UX: option to account for the sidebar in the breakpoint mixin (#17577)
* UX: account for sidebar in breakpoint mixin

* default to false
2022-07-20 10:56:41 +08:00
Kris
f0005401b7
UX: core adjustments and styles for the experimental sidebar (#17271) 2022-06-29 10:49:01 +08:00
Chapoi
a6abf8d07a
UX: update hljs-builtin-name colour (#16863) 2022-05-18 16:11:59 -04:00
Chapoi
96d656f450
UX: update hljs-builtin-name highlight (#16859)
* update hljs-builtin-name highlight

* Move dark-light function to better file
2022-05-18 15:55:40 +02:00
Jordan Vidrine
8cb344ddde
UX: Change color functions to match original primary, tertiary functions (#16040)
* UX: Change the way new primary colors are calculated
2022-02-23 15:41:50 -06:00
Penar Musaraj
715ec0d72f
DEV: Normalize ol and ul styling (#16027) 2022-02-22 22:17:41 +01:00
Jordan Vidrine
c92e62a271
UX: Styleguide changes & color variable additions (#15984) 2022-02-17 14:39:29 -06:00
Kris
34e2ed6d76
Revert "A11Y: Use dynamic type scaling on iOS devices (#15967)"
This reverts commit 9be2717e3b.
2022-02-16 10:01:58 -05:00
Kris
9be2717e3b
A11Y: Use dynamic type scaling on iOS devices (#15967) 2022-02-16 09:06:08 -05:00
janzenisaac
ee050e5063
DEV: Make user card non-clickable for anon users: (#15938)
Make name / avatar non-clickable for anon users
2022-02-14 11:25:41 -06:00
Penar Musaraj
3b75120b3d
UX: Support type=search inputs in inline forms (#15790) 2022-02-03 13:50:24 +01:00
Jordan Vidrine
0e371d4c6d
SYNTAX: Use classes instead of html element targeting (#14890)
* SYNTAX: Use classes instead of html element targeting
2021-11-15 14:49:45 -06:00
Penar Musaraj
dfeca42bf8
FEATURE: user/category/tag results in full page search (#14346)
See PR for details, this commit also changes the layout of the full page search.
2021-09-20 10:01:11 -04:00
Penar Musaraj
24e71acf3f
UX: Normalize sizing for inputs, buttons, dropdowns (#14226)
See PR for details
2021-09-09 11:01:56 -04:00
Kris
aa6daeaa3e
FEATURE: New style for personal messages (#13800) 2021-07-21 10:41:04 -04:00
Jarek Radosz
494fe7f2f6
UX: Adjust list and onebox margins (#13131)
Lists – made the indent smaller (helps on mobile), added vertical margin
Onebox – added top margin
2021-05-25 23:52:33 -04:00
Jarek Radosz
9b9b601e2f
DEV: Remove unused offscreen-content (#13133)
Looks like a vestige of Ember 1.x?
2021-05-25 18:39:06 +02:00
Josh Soref
59097b207f
DEV: Correct typos and spelling mistakes (#12812)
Over the years we accrued many spelling mistakes in the code base. 

This PR attempts to fix spelling mistakes and typos in all areas of the code that are extremely safe to change 

- comments
- test descriptions
- other low risk areas
2021-05-21 11:43:47 +10:00
Penar Musaraj
9bc126949e
DEV: Support referencing public images in plugins in SCSS (#12930) 2021-05-03 14:40:02 -04:00
Jeff Wong
849b786378
DEV: refactor font sizing into css custom variables (#12746)
* DEV: refactor font sizing into css custom variables

Add font variables as css variables. Allows plugins/themes to update/overwrite the variables and have core pick up changes. This allows for a theme or plugin to overhaul core's font ratios if desired.
2021-04-28 17:21:59 -07:00
Jeff Wong
75abe8d295
DEV: make font sizing and ratios default (#12741)
Make it easier for themes/plugins to use Discourse's built in font sizing
and override font ratios
2021-04-16 12:58:16 -07:00
Penar Musaraj
abb0a4bae2
DEV: Add SCSS helper to replace asset-uri and image-uri (#12664) 2021-04-12 13:57:39 +10:00
Penar Musaraj
e4f3a04d53
DEV: Move color definition functions to mixins (#12511) 2021-03-24 18:35:52 -04:00