Skip to content
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

Autocomplete2 editor fixes #2189

Merged
merged 2 commits into from Aug 2, 2021

Conversation

reosarevok
Copy link
Member

Fixes some issues I found while I was trying to figure out if MBS-11588 was an issue in Autocomplete2. Which I'm still not sure about, but that's a different question (@mwiencek, do you know the answer?).

This was using ENTITIES.url for calling ws/js, but the url for editor
is "user". That is correct for the website, but in ws/js, the actual
url is "editor".
Also, determineIfUserCanAddEntities needs to reject editors,
since obviously we don't support creating new editors
from a search.
None of these three currently support adding new entities
from a search. We're also unlikely to search them in situations
where we would support adding new entities, but it seems sensible
to block them preemptively.
@reosarevok reosarevok added the Bug Bugs that should be checked/fixed soonish label Jul 30, 2021
@reosarevok reosarevok requested a review from mwiencek July 30, 2021 08:03
@mwiencek
Copy link
Member

mwiencek commented Aug 2, 2021

Fixes some issues I found while I was trying to figure out if MBS-11588 was an issue in Autocomplete2. Which I'm still not sure about, but that's a different question (@mwiencek, do you know the answer?).

We don't use Autocomplete2 anywhere yet, so it'd be an issue in the old one still.

Comment on lines +81 to +83
const entityWebServicePath = state.entityType === 'editor'
? 'editor'
: ENTITIES[state.entityType].url;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, that's annoying. Maybe we should alias it to ws/js/user at some point.

@mwiencek mwiencek merged commit 9f89507 into metabrainz:master Aug 2, 2021
@reosarevok reosarevok deleted the autocomplete2-editor-fixes branch August 2, 2021 11:00
@reosarevok
Copy link
Member Author

We don't use Autocomplete2 anywhere yet, so it'd be an issue in the old one still.

I know that, but since it's relatively minor, it might not be worth fixing if it no longer happens with Autocomplete2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bugs that should be checked/fixed soonish
Projects
None yet
2 participants