Skip to content

feat: tags and postal code attributes #626

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

Merged
merged 13 commits into from
May 3, 2021
Merged

Conversation

franpb14
Copy link
Collaborator

@franpb14 franpb14 commented Apr 26, 2021

Postal code is related to users and tags is related to members (for those who belong to more than one organisation, they can have different tags depending on the organisation).

Closes #623

Issue623.mp4

@sseerrggii
Copy link
Contributor

😍

Just to be sure @franpb14 tags are shared only on the same organization? This is how it works in Posts

@franpb14
Copy link
Collaborator Author

franpb14 commented Apr 27, 2021

Yes, tags is an attribute of the member model. So, for example, a user can have "tag1 and tag2" in one organisation and "otherTag and ultimaTag" in another. And if you want to see the tags of an organisation, just take the members of the organisation and extract the tags.

@franpb14
Copy link
Collaborator Author

franpb14 commented Apr 27, 2021

I'm working on second step and I have seen a bug, with this PR it is not possible to search for publications by tags. I am looking into the reason for the failure but I wanted to warn you so that it doesn't merge. Sorry for the inconvenience.
Screenshot from 2021-04-27 22-28-49

@franpb14
Copy link
Collaborator Author

The problem was solved by indicating the table where to search for the tag in the query that was failing. Here is the commit that solves it.

@markets
Copy link
Collaborator

markets commented Apr 27, 2021

hi @franpb14 👋🏼

I think we can use this same branch and PR to add the other two points. The searcher and the autocomplete, seem quite "small" tasks (we have examples of both in current code base) and very tied to this code.

PS comment for latest commit 32f4ebe: this is a concern (a mixin with steroids) to be injected in other classes, so hardcoding the a table name seems wrong to me, it should use the table of the injected AR class, we can do it by using the table_name method, something like: where("? = ANY (#{table_name}.tags)", tag)

You can also click on a tag and the search will be executed directly. And the attributes are shown in the show and in the list (only the tags and if there are more than 3, not all). #623.
Member tags have also been added in the "Tags" section. Issue #623.
@franpb14
Copy link
Collaborator Author

franpb14 commented Apr 28, 2021

All steps in #623 are complete. I have two videos, the first one is related to the searchers working on tags:

Issue_623_searcher.mp4

And the last video is related to tag autocompletion taking into account the members tags and how to show the tags in "/tags/alpha_grouped_index":

Issue_623_autocomplete.mp4

@sseerrggii
Copy link
Contributor

sseerrggii commented Apr 29, 2021

OMG I love this feature, also I like really much that you added it on tags list page 👏 👏 👏

Copy link
Collaborator

@markets markets left a comment

Choose a reason for hiding this comment

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

hello @franpb14 very nice improvements 👏🏼 👏🏼 I just completed the review and added some comments. Let me know what do you think?

@franpb14
Copy link
Collaborator Author

Thank you very much @markets :). All changes are fine, I will make them between today and tomorrow.

And I have also added @member in case of failure of the forms.
@franpb14
Copy link
Collaborator Author

@markets all the feedback is incorporated and I have also added member in case of failure of the forms.

@markets
Copy link
Collaborator

markets commented Apr 29, 2021

@franpb14 pushed some refactoring 4d9d6a7

I'll take a second look tomorrow and we'll be ready for staging!

Copy link
Collaborator

@markets markets left a comment

Choose a reason for hiding this comment

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

@franpb14 @sseerrggii ready for staging! ✅ (i18n keys already added in Localeapp and pulled here)

@sseerrggii
Copy link
Contributor

Tested manually ✔️

@sseerrggii sseerrggii merged commit 3badc1a into develop May 3, 2021
@markets markets deleted the feat/tags-postcode-members branch May 3, 2021 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: search members by post code or tags
3 participants