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

Mapping of filter switches #16

Open
stezan opened this issue Sep 15, 2021 · 28 comments
Open

Mapping of filter switches #16

stezan opened this issue Sep 15, 2021 · 28 comments
Assignees
Milestone

Comments

@stezan
Copy link
Contributor

stezan commented Sep 15, 2021

Screenshot 2021-09-15 at 17 04 42

For every switch in the UI which is the correspondent parameter we should pass in the API of the events?

@RudiThoeni
Copy link
Member

I created an endpoint where you can retrieve
-TechnologyFields
-CustomTagging

https://tourism.opendatahub.bz.it/v1/EventShortTypes

Type identifies the field where to filter on, Key is the string value to filter

Type: CustomTagging
on the api Filter with
&rawfilter=in(CustomTagging.[],"Key")

Type: TechnologyFields
on the api Filter with
&rawfilter=in(TechnologyFields.[],"Key")

If you want you can also prefilter the Type call at example with
https://tourism.opendatahub.bz.it/v1/EventShortTypes?rawfilter=eq(Type,%22CustomTagging%22)
or retrieve only the fields you want with
https://tourism.opendatahub.bz.it/v1/EventShortTypes?rawfilter=eq(Type,%22CustomTagging%22)&fields=Id,Key

@chiaraDimension
Copy link
Collaborator

chiaraDimension commented Sep 16, 2021

Hi @RudiThoeni ,
from the endpoint you created, we can retrieve the possibile values to pass to TechnologyFields and CustomTagging filters respectively. But the link with the UI is still missing.

  1. Is the UI fixed or can it change depending on the values we retrieve from this new endpoint?

  2. If the UI is fixed, which id corresponds to each switch component?

    i.e. for event type section:

    • Public -> outofthelab
    • NOI only -> summeratnoi

    i.e. for technology sector section:

    • Green -> green
    • Food -> food
    • Digital -> digital
    • Automotiv -> automotiveautomation

@RudiThoeni
Copy link
Member

RudiThoeni commented Sep 16, 2021

Hi Chiara
You mean the UI of the filters should be controlled by the api?
I think let's keep it simple the UI is fixed but the values are retrieved from the api. We always try to avoid to add a endpoint which is valid only to control an app on a generic api......

I updated the EventShortTypes Response to be more flexible in future
(i think the app is only in english right?)

CustomTagging (Identified by Type: CustomTagging)

  • Display --> TypeDesc["en"]
  • Value --> Key

Filter by
&rawfilter=in(CustomTagging.[],"Key")
For filtering by more values simply use and/or like this
https://tourism.opendatahub.bz.it/v1/EventShort?rawfilter=or(in(CustomTagging.[],"Out of the Lab"),in(CustomTagging.[],"Summer at NOI"))

TechnologyFields (Identified by Type: TechnologyFields)

  • Display --> TypeDesc["en"]
  • Value --> Key

Filter by
&rawfilter=in(TechnologyFields.[],"Key")
For filtering by more values simply use and/or like this
https://tourism.opendatahub.bz.it/v1/EventShort?rawfilter=or(in(TechnologyFields.[],"Digital"),in(TechnologyFields.[],"Food"))

EventType Public,Noi only
---This is currently not implemented at the api....
But i added it on the EventTypes call so you can add it display only at the moment with no filter firing (for the mvp).....
(identified by Type:EventType)

@sseppi please ask to the design/planning team if they want this functionality on the api?

@chiaraDimension
Copy link
Collaborator

Hi @RudiThoeni ,
from the endpoint you created, we can retrieve the possibile values to pass to TechnologyFields and CustomTagging filters respectively. But the link with the UI is still missing.

  1. Is the UI fixed or can it change depending on the values we retrieve from this new endpoint?

  2. If the UI is fixed, which id corresponds to each switch component?
    i.e. for event type section:

    • Public -> outofthelab
    • NOI only -> summeratnoi

    i.e. for technology sector section:

    • Green -> green
    • Food -> food
    • Digital -> digital
    • Automotiv -> automotiveautomation

@sseppi these points are still open. Could you please give us a feedback?

@sseppi
Copy link

sseppi commented Sep 20, 2021

Unfortunately Marion is out of office till the 22nd, as soon as she will be back I will ask her and let you know.

@chiaraDimension
Copy link
Collaborator

@RudiThoeni could you please add the Italian and German descriptions in EventShortTypes Response? The app will be in three languages (see #20)

@sseppi
Copy link

sseppi commented Sep 20, 2021

@RudiThoeni could you please add the Italian and German descriptions in EventShortTypes Response? The app will be in three languages (see #20)

@RudiThoeni just let me know if we don't have the content in three languages, so I can define a strategy with Marion.

@RudiThoeni
Copy link
Member

@sseppi no i don't have i will add the same english desc to key de,it and then Marion can provide me the right german italian descs
https://tourism.opendatahub.bz.it/v1/EventShortTypes

@sseppi
Copy link

sseppi commented Sep 21, 2021

@RudiThoeni I would avoid to put the English version also in the other languages. I would prefer to do this filtering directly in the app. In this direction I see two possibilities:

  • the app uses followback language in case of missing translation;
  • the app shows only the events that has the description in the showed language.
    @chiaraDimension which solution do you suggest?

I will then ask Marion to update the data. So we keep the database clean.

@chiaraDimension
Copy link
Collaborator

@sseppi Before answering, let me clarify that the descriptions to add to the above endpoint response are relative to switch labels in filters screen.

These ones, to understand:
Screenshot 2021-09-21 at 09 38 33

@RudiThoeni
Copy link
Member

@sseppi i think we are mixing up things

one point is the text of the filter switches.
Here i created an Endpoint https://tourism.opendatahub.bz.it/v1/EventShortTypes
which has the filter "value" and the text to display stored.... The app takes this info and displays it so we can always change the descriptions ..... for this in the meantime i added "de" and "it" as a copy of the "en" Text

the second point is the description of an event, this data should be always there, but here it can occur that a language is not there so we have to define a fallback

@sseppi
Copy link

sseppi commented Sep 24, 2021

@RudiThoeni @chiaraDimension
I discussed this topic with the communication of NOI and we agreed that, since we are not sure to already have all needed informaton, we postpone this feature of filtering to the next release.

@RudiThoeni
Copy link
Member

Hi Chiara

I checked and Eventtype (Public, NOI Only) is now defined as "CustomTagging" in the api. and filterable by
CustomTagging Filter:
&rawfilter=in(CustomTagging.[],"Key")
TechnologyField Filter
&rawfilter=in(TechnologyFields.[],"Key")

All CustomTaggings/TechnologyFields are listed here and you can use the Titles in 'TypeDesc'
https://tourism.opendatahub.bz.it/v1/EventShortTypes

What is not clear to me is we currently have the Tags
Arts Culture, Square, Camp4Company, MiniNOI, Out of the Lab, Summer at NOI, NOI Community, Public

Should the app filter display all of this tags to filter on? or only certain tags? If not all Tags are available on the filters i have to include on api side the information on what Tags Dimension let filter on in the app @MarE1991 let's clarify this in our next meeting

@MarE1991
Copy link
Collaborator

MarE1991 commented Feb 3, 2022

Hi Chiara

I checked and Eventtype (Public, NOI Only) is now defined as "CustomTagging" in the api. and filterable by CustomTagging Filter: &rawfilter=in(CustomTagging.[],"Key") TechnologyField Filter &rawfilter=in(TechnologyFields.[],"Key")

All CustomTaggings/TechnologyFields are listed here and you can use the Titles in 'TypeDesc' https://tourism.opendatahub.bz.it/v1/EventShortTypes

What is not clear to me is we currently have the Tags Arts Culture, Square, Camp4Company, MiniNOI, Out of the Lab, Summer at NOI, NOI Community, Public

Should the app filter display all of this tags to filter on? or only certain tags? If not all Tags are available on the filters i have to include on api side the information on what Tags Dimension let filter on in the app @MarE1991 let's clarify this in our next meeting

@RudiThoeni @chiaraDimension the app filter should only display the two tags "NOI-Community" and "Public". The other filter options are irrelevant to the app.

@RudiThoeni
Copy link
Member

ok thx marion for clarify now i added a flag "Parent": "EventType" where we can filter on for the call what filters to display.....

so for dimension this query gives you all info to filter on
https://tourism.opendatahub.bz.it/v1/EventShortTypes?rawfilter=or(eq(Type,%22TechnologyFields%22),and(eq(Type,%22CustomTagging%22),eq(Parent,%22EventType%22)))
Here you find all text to display for the filter naming, and if we want to remove a filter we remove it from the api.....

CustomTagging --> Keys: (NOI Community, Public)
Filter the api by passing
&rawfilter=in(CustomTagging.[],"Key")

example:
https://tourism.opendatahub.bz.it/v1/EventShort?rawfilter=in(CustomTagging.[],%22Public%22)

TechnologyFields --> Keys: (Alpine,Automotive/Automation,Digital,Food,Green)
Filter the api by passing
&rawfilter=in(TechnologyFields.[],"Key")

example:
https://tourism.opendatahub.bz.it/v1/EventShort?rawfilter=in(TechnologyFields.[],%22Digital%22)

@sseppi sseppi added this to the MVP2 milestone Feb 7, 2022
@RudiThoeni RudiThoeni removed the blocked label Feb 8, 2022
@chiaraDimension
Copy link
Collaborator

chiaraDimension commented Feb 23, 2022

Hi @RudiThoeni,
I'll try to summarise what we have commented above.

Filters are dynamic. To get them, we have to call the endpoint https://tourism.opendatahub.bz.it/v1/EventShortTypes?rawfilter=or(eq(Type,%22TechnologyFi[…]q(Type,%22CustomTagging%22),eq(Parent,%22EventType%22))). From this endpoint we retrieve:

  • the descriptions to show in the UI (in TypeDesc field there are the three translations en/de/it)
  • the key to use when applying filter in v1/EventShort API

We'll show all filters that we obtain from this endpoint, without any checking. We'll only distinguish between "event type" filters and "technology sector" filters.

Questions:

  1. are filters mutually exclusive?
  2. how do we apply filters? Using OR operator or AND? Is it correct to use OR for filters of the same type, AND for filters of different types.
  3. how often do these filters change? We need to know if these keys could change excessively to avoid unpleasant UI side effects

cc @Piiit , @matax87

@chiaraDimension
Copy link
Collaborator

chiaraDimension commented Mar 1, 2022

Hi @RudiThoeni, I'll try to summarise what we have commented above.

Filters are dynamic. To get them, we have to call the endpoint https://tourism.opendatahub.bz.it/v1/EventShortTypes?rawfilter=or(eq(Type,%22TechnologyFi[…]q(Type,%22CustomTagging%22),eq(Parent,%22EventType%22))). From this endpoint we retrieve:

  • the descriptions to show in the UI (in TypeDesc field there are the three translations en/de/it)
  • the key to use when applying filter in v1/EventShort API

We'll show all filters that we obtain from this endpoint, without any checking. We'll only distinguish between "event type" filters and "technology sector" filters.

Questions:

  1. are filters mutually exclusive?
  2. how do we apply filters? Using OR operator or AND? Is it correct to use OR for filters of the same type, AND for filters of different types.
  3. how often do these filters change? We need to know if these keys could change excessively to avoid unpleasant UI side effects

cc @Piiit , @matax87

@RudiThoeni or @MarE1991 could you please give us some feedback?

@RudiThoeni
Copy link
Member

Hi @chiaraDimension

Yes everything is right
https://tourism.opendatahub.bz.it/v1/EventShortTypes?rawfilter=or(eq(Type,%22TechnologyFields%22),and(eq(Type,%22CustomTagging%22),eq(Parent,%22EventType%22)))

  1. what do you mean with mutually exclusive? If an event can be a noicommunity event AND also a public event?

  2. Here we have to ask the project Management, what would they expect if they filter by two Technologyfields AND Public event.... In that case I would expect an AND between all, what do you think @sseppi

  3. I think they will not change often, maybe the Description will change or a new TechnologySector will be added/ an old hidden......, i made the filters available trough the api because i wanted to avoid a new build of the app when some descriptions change.......

@chiaraDimension
Copy link
Collaborator

Thanks, @RudiThoeni!

  1. This point is linked to point 2. If an event cannot be both of NOI Community type and public, the possibilities are:

    1. the user can select both filters and they will be applied using OR operator
    2. the user can select only one of the two, therefore when he selects "public" filter, the other one will be automatically unselected

    The same considerations can be applied to technology sector filters.

cc @sseppi, @MarE1991

@RudiThoeni
Copy link
Member

Ok here we need the decision of the PMs @sseppi @MarE1991
Not sure if an event can be public and a noi community event.... or if a event can have more TechnologSectors applied?

I can only say from the data model/data insert form there are no restrictions. an event can have all of these ;)

@MarE1991
Copy link
Collaborator

MarE1991 commented Mar 2, 2022

Ok here we need the decision of the PMs @sseppi @MarE1991 Not sure if an event can be public and a noi community event.... or if an event can have more TechnologSectors applied?

I can only say from the data model/data insert form there are no restrictions. an event can have all of these ;)

@RudiThoeni @sseppi @chiaraDimension An event can either be public or for NOI-Community only. There are no events with both filters applicable, so it's an OR. Meanwhile, an event can be classified with more technology fields, but normally we choose one, also because on the website there can only be displayed one. So, here is an OR as well I would say.

And I would vote for that possibility:
the user can select only one of the two, therefore when he selects "public" filter, the other one will be automatically unselected

This was referenced Mar 4, 2022
@chiaraDimension
Copy link
Collaborator

@pkritzinger we found some issues in filters UI:

  1. buttons should be fixed to page bottom (outside scrolling area), otherwise they could be hidden

hidden_filter_buttons

  1. with fixed buttons, background color should be changed and margins should be reduced

2.1 In this case, buttons take too much space
filters_with_fixed_button

2.2 In this case, the user can not know that there are are filters hidden behind buttons and that he have to scroll:

Screenshot_20220308-084916

Screenshot_20220308-084922

Can you adjust the UI accordingly?

@pkritzinger
Copy link
Collaborator

@chiaraDimension : thanks for your input. We will check the possibilities we have and provide you an updated version for this view. I'll keep you posted.

@matax87
Copy link
Collaborator

matax87 commented Mar 8, 2022

For example:

simulator_screenshot_F84A5896-1AEF-4D11-8C23-CD4E732D30F1

I used an anchored footer with the same style of the old book a room in the orientate tab

@pkritzinger
Copy link
Collaborator

@matax87 : looks good, thanks for your input. It might make sense to switch the order of the buttons and put a shadow on the white container, but I'll discuss internally and let you know. Hope that's fine for you!

@matax87
Copy link
Collaborator

matax87 commented Mar 9, 2022

@Piiit can you update the title of this issue and the iOS one (noi-techpark/it.bz.noi.community.ios#18) to a more proper feature name? Thank you!

@pkritzinger
Copy link
Collaborator

@matax87 @chiaraDimension Please find the updated version for the filters here (Screens 5&6):
https://xd.adobe.com/view/88f8c31f-4678-43db-9f08-843df01e1798-ddab/

I'll send you the respective file per mail since Github does not allow me to upload it.

@Piiit
Copy link
Contributor

Piiit commented Mar 10, 2022

@Piiit can you update the title of this issue and the iOS one (noi-techpark/it.bz.noi.community.ios#18) to a more proper feature name? Thank you!

@matax87 I am not involved in this issue...

@sseppi @MarE1991 What would you like to have as title here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants