337 Commits

Author SHA1 Message Date
Jarek Radosz
7b6cd44c32
DEV: Remove most of jQuery usage from tests () 2022-07-13 19:29:19 +02:00
Jarek Radosz
c3fd91670e
DEV: Update linting setup and fix issues ()
Re-lands  and 

* Update eslint-config-discourse
* Update linting workflow
* Prettier-ignore stuff
* Update template-lint config
* Auto-fix template issues
* Fix various template issues
  Mostly incorrect attributes and unused templates
* Prettier js files
* Fix template auto-fix regressions
* Small css tweak

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 10:37:54 +02:00
Peter Wagenet
371bbadb92
No implicit this codemod ()
* Run no-implicit-this codemod for app templates
* Run tagless-ember-components-codemod for plugins
* Turn on no-implicit-this lint
2022-07-05 19:41:31 +02:00
David Taylor
c011dd7b43 DEV: Remove last few curly-component invocations 2022-07-04 17:25:42 +01:00
Jarek Radosz
624c684d51
DEV: Transpile all plugin js by default ()
Goodbye `# transpile_js: true`? 🙂
2022-06-21 22:07:10 +02:00
Martin Brennan
54a518b21d
FIX: Quoting local dates bbcode regeneration ()
This commit allows quoting of discourse-local-date elements
and converts the quoted tags back into bbcode so that the
rendered quote will also render the discourse-local-date HTML.
This works on single dates as well as date ranges, and supports
all of the options used by discourse-local-date.

This also necessitated adding addTextDecorateCallback to the
to-markdown core lib (similar to addBlockDecorateCallback and
addTagDecorateCallback) to transform the text nodes between
date ranges to remove the -> in the final quote.

c.f. https://meta.discourse.org/t/quotes-that-contain-date-time/101999
2022-06-21 10:07:21 +10:00
Jarek Radosz
36c2284dea
DEV: Fix typos "formated" -> "formatted" ()
(nothing in all-the* relies on these)
2022-06-20 20:02:05 +02:00
Jarek Radosz
ba2c7b8f35
DEV: Use the block form of module() () 2022-06-20 15:42:10 +02:00
Discourse Translator Bot
7ac485fb9f
FEATURE: Add Croatian language ()
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2022-06-18 00:18:22 +02:00
Discourse Translator Bot
f38a06f3a5
Update translations () 2022-06-11 13:20:37 +02:00
Discourse Translator Bot
41fa278c00
Update translations () 2022-05-31 16:14:37 +02:00
Discourse Translator Bot
d303466c30
Update translations () 2022-05-24 16:03:04 +02:00
Jarek Radosz
73940fa968
DEV: Use cloneJSON instead of spread operator ()
Spread does shallow clone, so changes in these tests leak.
2022-05-04 14:11:45 +08:00
Joffrey JAFFEUX
ad293e510d
FIX: destroys instance when hiding date popover ()
This fix attempts to fix an issue where the preview was not updated after changing timezone. Changing time would work as it would recreate the date DOM element and as a result, reset the popper.
2022-05-03 23:47:25 +02:00
Joffrey JAFFEUX
f86b53778d
FIX: closes popover when downloading calendar () 2022-05-02 20:35:15 +02:00
Joffrey JAFFEUX
fad94160c7
FIX: uses tippy for popover ()
Note this commit also introduce a new {{d-popover}} component, example usage:

```hbs
{{#d-popover |state|}}
  {{d-button label="foo.things" class="d-popover-trigger"}}

  <div class="d-popover-content">
    Some content
  <div>
{{/d-popover}}
```
2022-05-02 17:10:26 +02:00
Discourse Translator Bot
a1d7e77967
Update translations () 2022-04-12 21:04:30 +02:00
Jarek Radosz
14778ba52e
DEV: Fix select-kit deprecations () 2022-04-05 19:01:09 +02:00
Discourse Translator Bot
fe689115d4
Update translations () 2022-04-05 15:28:19 +02:00
Penar Musaraj
e66933ead4
DEV: Remove chat plugin button () 2022-03-31 09:16:33 -04:00
Penar Musaraj
943083f4df
DEV: Include helper in core for applyLocalDates () 2022-03-30 20:58:38 -04:00
Discourse Translator Bot
216dfbb895
Update translations () 2022-03-30 14:52:59 +02:00
Discourse Translator Bot
93407005b5
Update translations () 2022-03-10 16:51:47 +01:00
David Taylor
c9dab6fd08
DEV: Automatically require 'rails_helper' in all specs ()
It's very easy to forget to add `require 'rails_helper'` at the top of every core/plugin spec file, and omissions can cause some very confusing/sporadic errors.

By setting this flag in `.rspec`, we can remove the need for `require 'rails_helper'` entirely.
2022-03-01 17:50:50 +00:00
Jarek Radosz
2fc70c5572
DEV: Correctly tag heredocs ()
This allows text editors to use correct syntax coloring for the heredoc sections.

Heredoc tag names we use:

languages: SQL, JS, RUBY, LUA, HTML, CSS, SCSS, SH, HBS, XML, YAML/YML, MF, ICS
other: MD, TEXT/TXT, RAW, EMAIL
2022-02-28 20:50:55 +01:00
Discourse Translator Bot
12423b56cb
Update translations () 2022-02-15 15:10:10 +01:00
Discourse Translator Bot
fa9b2b4f42
Update translations () 2022-02-08 14:13:14 +01:00
Discourse Translator Bot
0dfaaf49a5
Update translations () 2022-02-04 16:23:45 +00:00
Penar Musaraj
febe997bee
FIX: Regression in timezone name localizations ()
This also switches to using the NPM package for better build stability. And adds a clearer label in the alert that is displayed to show your current timezone (when changing timezones).
2022-02-02 23:41:42 +01:00
Discourse Translator Bot
5fd13380d8
Update translations () 2022-01-25 14:27:05 +01:00
Discourse Translator Bot
f0435ca1a7
Update translations () 2022-01-23 11:14:20 +01:00
Krzysztof Kotlarek
17ec3bc5b9
FEATURE: date-range tag for local dates ()
New range tag for local dates with syntax like:
```
[date-range from=2022-01-06T13:00 to=2022-01-08 timezone=Australia/Sydney]
```

Previously, 2 dates in one line were considered as range. It was hard to decide if 2 dates are range when they were in separate lines or have some content between them.

New explicit tag should clearly distinguish between single date and range.

Common code from `addLocalDate` is extracted to `addSingleLocalDate`.

Both `addLocalDate` and new `addLocalRange` are using `addSingleLocalDate`.

Also, `defaultDateConfig` was extracted to have one place for all possible parameters.
2022-01-10 08:02:36 +01:00
Discourse Translator Bot
c665003203
Update translations () 2021-12-28 14:13:58 +01:00
Discourse Translator Bot
4afd6f0189
Update translations () 2021-12-14 14:53:35 +01:00
Discourse Translator Bot
3fec579ede
Update translations () 2021-12-07 16:19:44 +01:00
Natalie Tay
4c46c7e334
DEV: Remove xlink hrefs () 2021-11-25 15:22:43 +11:00
Discourse Translator Bot
563b27b763
Update translations () 2021-11-23 17:29:39 +01:00
Discourse Translator Bot
8420cf047e
Update translations () 2021-11-16 16:17:10 +01:00
Jarek Radosz
906a71a607
DEV: Fix linting issues in core plugins () 2021-11-13 15:31:42 +01:00
Jarek Radosz
4ad77f3382
DEV: Remove .es6 extensions from core ()
Still supported in plugins though.
2021-11-13 12:51:53 +01:00
Martin Brennan
431f0dce4c
DEV: Update discourse-local-dates for eslint shorthand rule ()
See 4f7aba06c0
2021-11-10 11:58:11 +11:00
Kris
a87216f1f3
A11Y: set modal widths with EMs; improves scaling () 2021-11-09 14:56:05 -05:00
Discourse Translator Bot
5d20304f95
Update translations () 2021-11-09 14:54:59 +01:00
Jarek Radosz
d162229758
DEV: Replace equal() with strictEqual() () 2021-11-08 10:26:28 +01:00
Discourse Translator Bot
6894b3f3af
Update translations () 2021-11-02 18:49:00 +01:00
Discourse Translator Bot
0f71a43434
Update translations () 2021-10-27 14:24:43 +02:00
Discourse Translator Bot
25097fa0af
Update translations () 2021-10-19 15:23:54 +02:00
Krzysztof Kotlarek
9062fd9b7a
FIX: improvements for download local dates ()
* FIX: do not display add to calendar for past dates

There is no value in saving past dates into calendar

* FIX: remove postId and move ICS to frontend

PostId is not necessary and will make the solution more generic for dates which doesn't belong to a specific post.

Also, ICS file can be generated in JavaScript to avoid calling backend.
2021-10-14 09:22:44 +11:00
Discourse Translator Bot
b44119cdb2
Update translations () 2021-10-12 16:00:22 +02:00
David Taylor
837bd5a6e5
FIX: Fix local-dates in non-post contexts, and in long topics ()
- Stop looking up the topic title from the DOM. On long topics, the topic title may not be present. Instead, we can store the topic title in a data-title attribute during decorateCookedElement, and then access it later. This approach would also allow us to add customize titles per-local-date in future. If there is no topic title available (e.g. when local dates are used elsewhere in the UI), we use the site name to build a sensible default

- Don't require a postId for creating calendar events. We don't have postIds in non-post contexts. At the moment, the 'download ICS' function will fail without a valid postId, so that will need to be fixed in a future commit.
2021-10-08 20:22:52 +01:00