Conversation
| $(() => { | ||
| const $mentionContainer = $('.js-mentions-container'); | ||
|
|
||
| const sources = [ |
There was a problem hiding this comment.
Why do we have this static data here? Isn't this used only as an example? If so, it should live only inside the design app (under app/assets).
There was a problem hiding this comment.
No, no, it's yet in progress. That's an example, you may ignore it. I'll provide further info when release. 😀
Nevertheless, input_tags.js is ready. You could check this out. I've tried to pay attention in how you add vendor & javascripts to the app, because they're gonna straight to the core.
There was a problem hiding this comment.
Oh, sorry! I was in a review spree and didn't see this was actually in progress. Ignore me! And good job!
Codecov Report
@@ Coverage Diff @@
## master #2684 +/- ##
=======================================
Coverage 98.59% 98.59%
=======================================
Files 1716 1716
Lines 40967 40967
=======================================
Hits 40393 40393
Misses 574 574 |
|
This PR is ready to be reviewed. |
|
|
||
| $(() => { | ||
| const $mentionContainer = $('.js-mentions'); | ||
| const nodatafound = 'No results.'; // TODO: this string must be i18n |
There was a problem hiding this comment.
This string is hardcoded. How can be get it from locales?
There was a problem hiding this comment.
Maybe from a data attribute?
There was a problem hiding this comment.
Is it done anywhere else? You mean something like: data-no-results="<%= t('no-results') %>" ?
There was a problem hiding this comment.
Yes, that's the idea. Don't know if it's used elsewhere (I think we do use it, but can't think of a specific file that does), but yes, that's how it should work!
Then from the JS you get the value of this attribute 😄
There was a problem hiding this comment.
Well, one problem less. :D
| $(() => { | ||
| const $mentionContainer = $('.js-mentions'); | ||
| const nodatafound = 'No results.'; // TODO: this string must be i18n | ||
| const sources = []; // TODO: Object with remote data. See Tribute.js DOCS |
There was a problem hiding this comment.
We need to get an array object-like to make it work. Below there is an example. I strongly recommend to read the tribute.js docs, as the remote data will come from async function, I presume, am I right?
|
I have included in the |
|
hi, this seems to be frozen for a couple of weeks, @agustibr can you update on this? |
|
@agustibr thanks for the update |
|
@decidim/product After discussing it offline with @Crashillo if this PR have all checks passed with no errors, and cells are in master, I will start refactoring the hashtags issue. @decidim/lot-core do you agree that you start a new branch from this branch? Or do you want to accept this PR and merge with master, and then I create a new branch based on master? |
ok! |
|
@isaacmg410 I think this can be merged as is, to keep PRs simpler. Simple remember to update |
|
@isaacmg410 the JS lint fails, can you check it though please? |
|
@mrcasals do this then! |
|
@isaacmg410 merging this - looking forward to seeing it implemented! 🚀 |
|
Nice work @Crashillo ! |
🎩 What? Why?
Add support for tags and mentions. It expects to work as components out-of-the-box.
Currently is appended to the filters partial.
📌 Related Issues
🔔 Considerations
📷 Screenshots (optional)