Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

feat: Added separate component for results list rendering. #148

Merged
merged 2 commits into from
Mar 16, 2022
Merged

Conversation

duozersk
Copy link
Contributor

@duozersk duozersk commented Feb 15, 2022

We have the requirement to render results list in several groups and insert other content in between these groups.

And it was a good opportunity to introduce a separate component to render list of results. We can use this new component ResultsList to render just a subset of results, then insert other custom content and then render the rest of results. Plus it makes the Results component less complex in terms of lines of code and logic.

@podarok
Copy link
Contributor

podarok commented Feb 15, 2022

@duozersk cool
Could you provide more details into README.md and screenshots before after if there is anything to show there?

@duozersk duozersk changed the title feat: Added separate component for results list rendering. [WIP] [DO NOT MERGE] feat: Added separate component for results list rendering. Feb 15, 2022
@duozersk duozersk added DO NOT MERGE enhancement New feature or request labels Feb 16, 2022
@duozersk duozersk force-pushed the results branch 2 times, most recently from f4a659c to 245eb88 Compare February 16, 2022 09:23
@duozersk duozersk changed the title [WIP] [DO NOT MERGE] feat: Added separate component for results list rendering. feat: Added separate component for results list rendering. Feb 16, 2022
@duozersk
Copy link
Contributor Author

@podarok I don't think there is anything to add to README here. I see it just as changes in the internal components of Activity Finder application. There are no any visible changes for the user.
On the other hand, it allows flexibility in terms of results rendering for the developer:

          <ResultsList
            :results="data.table"
            :ages="ages"
            :selected-ages="selectedAges"
            :legacy-mode="legacyMode"
            :disable-spots-available="disableSpotsAvailable"
            @showActivityDetailsModal="showActivityDetailsModal($event)"
          />

can be changed to this:

          <ResultsList
            :results="data.table.slice(0, 2)"
            :ages="ages"
            :selected-ages="selectedAges"
            :legacy-mode="legacyMode"
            :disable-spots-available="disableSpotsAvailable"
            @showActivityDetailsModal="showActivityDetailsModal($event)"
          />
          <YGBWAds />
          <ResultsList
            :results="data.table.slice(2)"
            :ages="ages"
            :selected-ages="selectedAges"
            :legacy-mode="legacyMode"
            :disable-spots-available="disableSpotsAvailable"
            @showActivityDetailsModal="showActivityDetailsModal($event)"
          />

where YGBWAds is custom component to render custom content in between the results.

@podarok podarok merged commit 5e82c3b into 4.x Mar 16, 2022
@podarok podarok deleted the results branch March 16, 2022 11:51
@podarok
Copy link
Contributor

podarok commented Mar 16, 2022

merged and tagged in https://github.com/ymcatwincities/openy_activity_finder/releases/tag/4.1.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants