Skip to content

Commit d441832

Browse files
fix: remove experimental "x" and "x_" prefixes from fullText & ongoing
done: - replace `xFullText` with `fullText` - replace `xOngoing` with `ongoing` - replace `x_full_text` with `full_text` - replace `x_ongoing` with `ongoing` - remove mentions of experimental fields as they're not experimental anymore after removing the "x" / "x_" prefixes refs TH-1428
1 parent ad7bbff commit d441832

23 files changed

Lines changed: 75 additions & 82 deletions

File tree

apps/events-helsinki/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,8 @@ The conversion map looks (something) like this:
281281
{ key: "audience_max_age_gt", value: params.audienceMaxAgeGt },
282282
{ key: "suitable_for", value: params.suitableFor },
283283
{ key: "ids", value: params.ids },
284-
// Experimental fields...
285-
{ key: "x_full_text", value: params.xFullText },
286-
{ key: "x_ongoing", value: params.xOngoing },
284+
{ key: "full_text", value: params.fullText },
285+
{ key: "ongoing", value: params.ongoing },
287286
];
288287
```
289288

@@ -297,8 +296,8 @@ The "main events search" component is used in the search page at `/search`.
297296
| include | ['keywords', 'location'] | - | x | Fetch related data from datasource |
298297
| pageSize | 25 | - | x | How many items are fetched per page |
299298
| division | "ocd-division/country:fi/kunta:helsinki" | - | x | Only events in Helsinki |
300-
| xOngoing | true | - | x | include the ongoing events |
301-
| xFullText | "" | x | x | A text scoring mathcher (title, place, description, ...) |
299+
| ongoing | true | - | x | include the ongoing events |
300+
| fullText | "" | x | x | A text scoring mathcher (title, place, description, ...) |
302301
| sort | "end_time" | x | x | Sorting order of the result set. Default is "event end time as ascending" |
303302
| start | "now" | x | x | Filter by event starting time |
304303
| end | null | x | - | Filter by event ending time |

apps/events-helsinki/src/domain/search/eventSearch/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export const getEventSearchVariables = ({
265265
/**
266266
* As per LinkedEvents requirements (see LINK-2422; https://helsinkisolutionoffice.atlassian.net/browse/LINK-2422),
267267
* relevance sorting (rank) is activated by providing an *empty string* as the sort parameter when
268-
* `x_full_text` is used, not the literal '-rank' value.
268+
* `full_text` is used, not the literal '-rank' value.
269269
*/
270270
sort: sortOrder === EVENT_SORT_OPTIONS.RANK_DESC ? '' : sortOrder,
271271
start,

apps/hobbies-helsinki/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,8 @@ The conversion map looks (something) like this:
281281
{ key: "audience_max_age_gt", value: params.audienceMaxAgeGt },
282282
{ key: "suitable_for", value: params.suitableFor },
283283
{ key: "ids", value: params.ids },
284-
// Experimental fields...
285-
{ key: "x_full_text", value: params.xFullText },
286-
{ key: "x_ongoing", value: params.xOngoing },
284+
{ key: "full_text", value: params.fullText },
285+
{ key: "ongoing", value: params.ongoing },
287286
];
288287
```
289288

@@ -297,8 +296,8 @@ The "main events search" component is used in the search page at `/search`.
297296
| include | ['keywords', 'location', 'registration'] | - | x | Fetch related data from datasource |
298297
| pageSize | 25 | - | x | How many items are fetched per page |
299298
| division | "ocd-division/country:fi/kunta:helsinki" | - | x | Only city of Helsinki events |
300-
| xOngoing | true | - | x | include the ongoing events |
301-
| xFullText | "" | x | x | A text scoring mathcher (title, place, description, ...) |
299+
| ongoing | true | - | x | include the ongoing events |
300+
| fullText | "" | x | x | A text scoring mathcher (title, place, description, ...) |
302301
| sort | "end_time" | x | x | Sorting order of the result set. Default is "event end time as ascending" |
303302
| start | "now" | x | x | Filter by event starting time |
304303
| end | null | x | - | Filter by event ending time |

apps/hobbies-helsinki/src/domain/search/eventSearch/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export const getEventSearchVariables = ({
283283
/**
284284
* As per LinkedEvents requirements (see LINK-2422; https://helsinkisolutionoffice.atlassian.net/browse/LINK-2422),
285285
* relevance sorting (rank) is activated by providing an *empty string* as the sort parameter when
286-
* `x_full_text` is used, not the literal '-rank' value.
286+
* `full_text` is used, not the literal '-rank' value.
287287
*/
288288
sort: sortOrder === EVENT_SORT_OPTIONS.RANK_DESC ? '' : sortOrder,
289289
start,

apps/sports-helsinki/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,8 @@ The conversion map looks (something) like this:
368368
{ key: "audience_max_age_gt", value: params.audienceMaxAgeGt },
369369
{ key: "suitable_for", value: params.suitableFor },
370370
{ key: "ids", value: params.ids },
371-
// Experimental fields...
372-
{ key: "x_full_text", value: params.xFullText },
373-
{ key: "x_ongoing", value: params.xOngoing },
371+
{ key: "full_text", value: params.fullText },
372+
{ key: "ongoing", value: params.ongoing },
374373
];
375374
```
376375

@@ -388,8 +387,8 @@ The "main events search" component is used in the search page at `/search`.
388387
| include | ['keywords', 'location'] | - | x | Fetch related data from datasource |
389388
| pageSize | 25 | - | x | How many items are fetched per page |
390389
| division | "ocd-division/country:fi/kunta:helsinki" | - | x | Only city of Helsinki events |
391-
| xOngoing | true | - | x | include the ongoing events |
392-
| xFullText | "" | x | x | A text scoring mathcher (title, place, description, ...) |
390+
| ongoing | true | - | x | include the ongoing events |
391+
| fullText | "" | x | x | A text scoring mathcher (title, place, description, ...) |
393392
| sort | "end_time" | x | x | Sorting order of the result set. Default is "event end time as ascending" |
394393
| start | "now" | x | x | Filter by event starting time |
395394
| end | null | x | - | Filter by event ending time |

apps/sports-helsinki/src/domain/event/__tests__/EventPageContainer.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ const mocks = [
120120
}),
121121
createEventListRequestAndResultMocks({
122122
variables: {
123-
xFullText: '',
124-
xOngoing: true,
123+
fullText: '',
124+
ongoing: true,
125125
keywordOrSet2: eventKeywordIds,
126126
eventType: [EventTypeId.Course],
127127
superEvent: 'none',
@@ -236,8 +236,8 @@ it('shows similar events when SIMILAR_EVENTS flag is on', async () => {
236236
...mocks,
237237
createEventListRequestAndResultMocks({
238238
variables: {
239-
xFullText: '',
240-
xOngoing: true,
239+
fullText: '',
240+
ongoing: true,
241241
keywordOrSet2: ['yso:p916', 'yso:p9824', 'yso:p6409'],
242242
eventType: [EventTypeId.Course],
243243
superEvent: 'none',

apps/sports-helsinki/src/domain/search/combinedSearch/__tests__/SearchUtilities.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ const mocks = [
5555
}),
5656
createEventListRequestAndResultMocks({
5757
variables: {
58-
xFullText: '',
59-
xOngoing: true,
58+
fullText: '',
59+
ongoing: true,
6060
keywordOrSet1: SPORT_COURSES_KEYWORDS,
6161
language: undefined,
6262
eventType: EventTypeId.Course,
@@ -65,8 +65,8 @@ const mocks = [
6565
}),
6666
createEventListRequestAndResultMocks({
6767
variables: {
68-
xFullText: '',
69-
xOngoing: true,
68+
fullText: '',
69+
ongoing: true,
7070
keywordOrSet1: SPORT_COURSES_KEYWORDS,
7171
language: undefined,
7272
eventType: EventTypeId.Course,
@@ -75,8 +75,8 @@ const mocks = [
7575
}),
7676
createEventListRequestAndResultMocks({
7777
variables: {
78-
xFullText: '',
79-
xOngoing: true,
78+
fullText: '',
79+
ongoing: true,
8080
keywordOrSet1: SPORT_COURSES_KEYWORDS,
8181
language: undefined,
8282
eventType: EventTypeId.General,

apps/sports-helsinki/src/domain/search/combinedSearch/adapters/EventSearchAdapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class EventSearchAdapter implements CombinedSearchAdapter<EventSearchParams> {
2020
* List here all the event and course search parameters
2121
* that are wanted to be mapped with the combined search.
2222
*/
23-
xFullText?: EventSearchParams['xFullText'];
24-
xOngoing: EventSearchParams['xOngoing'];
23+
fullText?: EventSearchParams['fullText'];
24+
ongoing: EventSearchParams['ongoing'];
2525
start: EventSearchParams['start'];
2626
end: EventSearchParams['end'];
2727
include: EventSearchParams['include'];
@@ -54,7 +54,7 @@ class EventSearchAdapter implements CombinedSearchAdapter<EventSearchParams> {
5454
// Initialize the object with default values
5555
Object.assign(this, initialEventSearchAdapterValues, { eventType });
5656

57-
this.xFullText = input.text || initialEventSearchAdapterValues.xFullText;
57+
this.fullText = input.text || initialEventSearchAdapterValues.fullText;
5858
this.keywordAnd = [];
5959
this.keywordOrSet1 = SPORT_COURSES_KEYWORDS;
6060
this.keywordOrSet2 = this.getSportsKeywords(input);
@@ -82,7 +82,7 @@ class EventSearchAdapter implements CombinedSearchAdapter<EventSearchParams> {
8282
*
8383
* As per LinkedEvents API requirements (see LINK-2422), relevance sorting (rank)
8484
* is activated by providing an *empty string* as the sort parameter when
85-
* `x_full_text` is used, not the literal '-rank' value. This function
85+
* `full_text` is used, not the literal '-rank' value. This function
8686
* performs that conversion.
8787
*
8888
* @param {EventTypeId} eventType The type of event, used to decide whether to use `eventOrderBy` or `courseOrderBy`.

apps/sports-helsinki/src/domain/search/combinedSearch/adapters/__tests__/CombinedSearchFormAdapter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ describe('CombinedSearchFormAdapter', () => {
140140
keywordAnd: outputQuery.keywords,
141141
sort: outputQuery.eventOrderBy ?? null,
142142
eventType: EventTypeId.General,
143-
xFullText: outputQuery.text,
144-
xOngoing: true,
143+
fullText: outputQuery.text,
144+
ongoing: true,
145145
start: 'now',
146146
end: '',
147147
keywordNot: [],

apps/sports-helsinki/src/domain/search/combinedSearch/adapters/__tests__/EventSearchAdapter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ describe('EventSearchAdapter', () => {
2727
const adapter = new EventSearchAdapter(input, eventType);
2828
const result = {
2929
eventType,
30-
xFullText: input.text,
31-
xOngoing: true,
30+
fullText: input.text,
31+
ongoing: true,
3232
start: 'now',
3333
end: '',
3434
keywordAnd: input.keywords,

0 commit comments

Comments
 (0)