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

[Issue]: Group Finder Block Not Showing Results on Load when User is Logged In #12

Open
2 tasks done
melissadrexler opened this issue Oct 18, 2023 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be.

Comments

@melissadrexler
Copy link

Describe the Issue in Detail

For the Group Finder block - as a logged in user, when I choose to Show Results on Initial Page Load, I get no results found. But once I tap Search on the filters (adding no filters) the list shows as expected. If I am logged out, the list loads initially as expected.

Can reproduce in

  • Orange App
  • Blue App

Steps to Reproduce

  1. Add a group finder block to a page
  2. Turn on the option to Show Results on Initial Page Load
  3. Save and deploy
  4. Log in
  5. Open the Finder Page
  6. No results show

Expected Behavior

All results would show that fit all of the other set block options, regardless of login status.

Actual Behavior

No results show until an empty filter (just tapping with with no options selected) is applied, then all results show, when a user is logged in.

Screenshots or Videos

Orange app video: https://drive.google.com/file/d/1r1jYt1iRHjAMDC94jMOqPC5arWYJ7YvA/view?usp=share_link
Block Settings 1: https://drive.google.com/file/d/1x_ldR6LQPGIYKmeChidQFF5vpkxo1ceJ/view?usp=share_link
Block Settings 2: https://drive.google.com/file/d/1UhCHEIoOa5IlX9FTrwyJrF3-aWiDERUJ/view?usp=sharing

Reproduction XAML

Here is our custom template we are using:
{% if Groups == empty %}
    <StackLayout StyleClass="mt-6,p-12" Spacing="12">
        <Label StyleClass="text-md,font-weight-bold,text-center" 
            TextColor="#222222"  
            Text="No events match your current filters. Please try adjusting them or checking back soon for more events!"/>
    </StackLayout>
{% else %}
    <StackLayout StyleClass="p-12">
        <Rock:Divider />
        {% assign groupsSorted = Groups | SortByAttribute:'DateTime1' %}
        {% for group in groupsSorted %}
            {% assign groupMemberCount = group.Members | Size -%}
            {%- assign activeCount = 0 -%}
            {%- for member in group.Members -%}
                {% assign status = member.GroupMemberStatus -%}
                {%- if status == 1 -%}
                    {%- assign activeCount = activeCount | Plus: 1 -%}
                {%- endif -%}
            {%- endfor -%}
            {%- assign capacity = group.GroupCapacity -%}
            {%- assign spotsLeft = capacity | Minus:activeCount -%}
            <Grid ColumnDefinitions="1*, 15" ColumnSpacing="12" StyleClass="group-content">
                {% if DetailPage != null %}
                    {% assign groupGuid = group.Guid %}
                    {% assign groupId = group.Id %}
                    <Grid.GestureRecognizers>
                        <TapGestureRecognizer Command="{Binding PushPage}" CommandParameter="{{ DetailPage }}?GroupGuid={{ group.Guid }}" />
                    </Grid.GestureRecognizers>
                {% endif %}
                <StackLayout Grid.Column="0" StyleClass="group-primary-content">
                    <Label Text="{{ group.Name | Escape }}" StyleClass="group-name" />
                    {% if group.Schedule.WeeklyTimeOfDay != null %}
                        <Label Text="Weekly at {{ group.Schedule.WeeklyTimeOfDayText }} on {{ group.Schedule.WeeklyDayOfWeek }}" HorizontalOptions="Start" StyleClass="group-meeting-time" />
                    {% elsif group.Schedule != null %}
                        <Label Text="{{ group.Schedule.FriendlyScheduleText }}" HorizontalOptions="Start" StyleClass="group-meeting-time" />
                    {% endif %}
                    {% assign type = group | Attribute:'ProjectType' %}
                    <Label Text="{{ group | Attribute:'GeneralArea' | Escape }}  |  {{ type | Escape }}" />
                    {% comment %}
                    {% if type == 'Run Day' or type == 'Packing' or type == 'Street Ministry' or type == 'Feed Your Neighbor' or type == 'Motels' %}
                        <Label Text="{{ group | Attribute:'GeneralArea' | Escape }}  |  {{ type | Escape }}" />
                    {% else %}
                        <Label Text="{{ group | Attribute:'GeneralArea' | Escape }}/>
                    {% endif %}
                    {% endcomment %}
                    {%- if spotsLeft <= 0 -%}
                        <Label Text="Event is Full" TextColor="#ff4539"/>
                    {%- endif -%}
                </StackLayout>
    
                <Rock:Icon IconClass="chevron-right" Grid.Column="1" HorizontalOptions="End" VerticalOptions="Center" StyleClass="group-more-icon" />
            </Grid>
            <Rock:Divider />
        {% endfor %}
    </StackLayout>
{% endif %}

Mobile Shell Version

4.0 I believe

Last Known Working Version

None

iOS Device Type(s) and iOS Version(s)

iPhone 11 running 16.6

Android Device Type(s) and Android Version(s)

Pixel 5a running Android 13

@melissadrexler melissadrexler added bug Something isn't working unverified This issue has not been verified yet labels Oct 18, 2023
@bradencohen bradencohen added Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. and removed unverified This issue has not been verified yet labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be.
Projects
None yet
Development

No branches or pull requests

2 participants