-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2024-11-07] TinyMCE: Insert contact, but track using linkcheck #3169
[2024-11-07] TinyMCE: Insert contact, but track using linkcheck #3169
Conversation
03928ef
to
9e1ff12
Compare
Adding TomSelect could easily be its own PR, but we already have so many of those. Feel free to split this up if you find a sensible way how |
11f8851
to
36b8c05
Compare
af2ce21
to
5e76e83
Compare
This is now ready for review @PeterNerlich @david-venhoff @JoeyStk @MizukiTemma |
I haven't yet finished reviewing but following functions seem to be behaving good:
We probably need either protection of embedded contacts from deleting/archiving or automatic deletion of contact cards at the moment of contact deletion. An issue is opened for this topic #3260 |
Thank you so much for tackling this complicated issue 💪 This PR looks already super cool, the main functions seem to be working as expected 🥺 😻 I have some suggestions to the contact card.
@osmers Your opinion is important here 👂 ah, maybe a part of/related to #3258 ? |
I'd like to be able to test this myself to be able to say exactly what is missing, but from the things I can see here:
Everything else is a bit hard to decide without trying the function for myself and so far I don't see it on test yet, right? Switching shortcuts - difficult question. I think it might confuse the people who are already using the existing shortcut, especially since it's the same for any other program to add a link. I think I would keep it, even though it's not intuitive... maybe @nikolahoff has some insight into user behaviour here as well? |
Do you mean that if the contact has no name, the user can enter one? If so, I think that is really difficult to achieve right now - it's also a bit contrary to the idea that users should manage contaacts in a central location. Or do yo mean that user can update existing contacts with a name on-the-fly and it gets saved to the contact model?
👍🏼 Good idea! Will add.
Could we just drop the ":" altogether? Then it doesn't matter if a name is provided, and can't inferfer with ":" in titles. I think the bold font is probably enough separation? Not sure though. |
If you have a couple of minutes after the weekly, I could screenshare? Not the same as testing yourself, I know, but perhaps better than just reading about it 😄
Will add. In the Grooming yesterday, opening hours were also mentioned - though I suspect that is something for down-the-line?
No, this will be added after this PR is merged: #3258
No, not yet - just opened #3268 for this, thanks for the reminder 😅
Yep, that'll only happen after this is merged.
Ah, fair point, I thought Ctrl+K for Links was "our invention", so to speak (I only knew it as "search globally" 😄). |
@charludo that would be great - though I'm only free at 2pm for half an hour 😅 Regarding the shortcut - in word Ctrl+K is also for links :D and in Thunderbird as well... Opening hours were initially planned by us but then dropped and the municipalities mentioned that they would need it bcs the opening hours for a contact can be quite different from the POI (which we had planned to just take). But I guess for the time being they could add them manually to the editor and we can implement it as an update afterwards... |
Ctrl+P would be overriden by our own shortcut. IMO that's fine, I doubt anyone needs to print the CMS editor view... 😅
OK, so this is a planned feature, to be able to add "contact opening hours", and after tha't implemented we can add them here?
Not 1005 sure what you mean - do you mean they can just add them as plain text in the editor? If so, sure, that's fine (albeit some extra work for them when we introduce the feature). |
No no, I didn't mean that complicated 🙈 |
Ohhhhhh that makes sense. Sorry 😄 |
@MizukiTemma how about this for avoiding the ":"? Also, if I understood @osmers correctly, the POI name should not be shown afterall, only its address. @osmers is the styling OK with you? Reduced the gaps as suggested. No gaps look kinda weird however. |
49e066b
to
fa0f8e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much 🥺 🙏 Looks good 🚀
I've added a link to the Integreat Map, if it is shown there, to Google Maps otherwise. I've also updated the link shown in the contact edit view to use the same, consistent link to the Integreat Map. |
3a4f17e
to
bebba4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this massive pr, it looks really cool 🚀
I have a bunch of suggestions, but most of them are relatively minor or just nits.
integreat_cms/static/src/js/tinymce-plugins/custom_contact_input/plugin.js
Outdated
Show resolved
Hide resolved
85877d0
to
1e51ce7
Compare
Thank you for the thorough review!! I think I was able to address most of it, apart from the unresolved conversation above. |
1e51ce7
to
29a989f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, let's give it a try 🥳
@charludo |
@david-venhoff fantastic, thank you, those changes all make perfect sense 👍🏼 |
81a9c96
to
0944716
Compare
Short description
We want to embed contacts on pages and in other content. This PR is an alternative to #3124.
Contact cards contain a hidden link, allowing us to track where a contact is used with the linkchecker.
Proposed changes
Side effects
linkcheck
will check the contact links and find that no resource is being served at those URIs. THey are shown as valid, but we could also hide them.Known issues
Adding a contact to a page/poi/event is not immediately reflected in the contact form. It is reflected eventually, once the linkchecker has run again. (You can manually trigger this with
./tools/integreat-cms-cli findlinks
, although even that is not 100% reliable...)This is not ideal; IDK if we could trigger a linkcheck run every time a contact is saved...? Or can a Link manually be inserted into the DB?
Open quetions
The shortcut for adding a "[K]ontakt" is
Ctrl+L
, the shortcut for adding a "[L]ink" isCtrl+K
...That's not exactly intuitive. @osmers is it feasible to switch these two, even though users might already be used to inserting links with
Ctrl+K
?Resolved issues
Fixes: #2959
Pull Request Review Guidelines