From 93695d3c18d1727f1cad7d466fe2f958ed2a7a95 Mon Sep 17 00:00:00 2001 From: Frank Nguyen <41023671+FrankreedX@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:11:28 +0700 Subject: [PATCH] IWB-8: debounce some buttons (#309) * added blacklist hook * black list feature works * some unused stuff removal * waitlist seems to work * simplified removeBlacklist.js * pretty * removed transaction and hope that it works * fixed useBlackList.js hook firestore error, and made blacklist check functional * added refresh spinner for chooseTeam.js * updated invalidateKeys and fixed some styling * updated faulty invalidateKeys lists * kinda works lmao * updated the invalidateKeys again * navigation off chooseTeam works. Tech debt +1 * half finished progress * invite works * added waitlistError to ErrorComponent * pretty * text input moves above keyboard now * minor comment change Co-authored-by: Jake Gehrke <91503842+Gehrkej@users.noreply.github.com> * changed console log wording in removeBlacklist Co-authored-by: Jake Gehrke <91503842+Gehrkej@users.noreply.github.com> * removed copied over comment * updated tiny comment Co-authored-by: Jake Gehrke <91503842+Gehrkej@users.noreply.github.com> * removed redundant log Co-authored-by: Jake Gehrke <91503842+Gehrkej@users.noreply.github.com> * fix - added email to blacklist record * fix - added assertion if pfp exists when removing a user * added loading spinner to all buttons * can't invite already invited email * accepting invite will remove the invite * workin on remove user * added invitelist bug fix * migrating to react native paper Button's loading property for loading spinner * redundant comment Co-authored-by: Jake Gehrke <91503842+Gehrkej@users.noreply.github.com> * :/ Co-authored-by: Jake Gehrke <91503842+Gehrkej@users.noreply.github.com> * prevent double navigation to chooseTeam screen * remove half baked loading spinner on dialog component (will be its own pr) * changed dialog component's signature to contain loading * fixed "invalid-argument" * debounced invite button * added key * last usage of Activity Indicator in a simple button replaced temp * Fixed Android keyboard avoiding for invitelist * removed redundant remove user fix * pretty * pretty * pretty * pretty * pretty * pretty * IWB-7: allow using the "loading" property in DialogComponent (#313) * added missing state from merge * simple fix * better align invite input with above elements * debounced invitelist without changing the color of the loading wheel * changed more "white" to use themecolors, and added spinner color to some buttons * debounced and error handled Unban --------- Co-authored-by: Jake Gehrke <91503842+Gehrkej@users.noreply.github.com> Co-authored-by: Jake Gehrke --- app/segments/(team)/blacklist.js | 19 +++++++++++++++---- app/segments/(team)/invitelist.js | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/segments/(team)/blacklist.js b/app/segments/(team)/blacklist.js index e4d54a6f..49b3f9b3 100644 --- a/app/segments/(team)/blacklist.js +++ b/app/segments/(team)/blacklist.js @@ -3,6 +3,7 @@ import { useState } from "react"; import { ScrollView, View } from "react-native"; import { Button, List } from "react-native-paper"; import { themeColors } from "~/Constants"; +import { getErrorString } from "~/Utility"; import ErrorComponent from "~/components/errorComponent"; import Loading from "~/components/loading"; import RefreshInvalidate from "~/components/refreshInvalidate"; @@ -55,10 +56,20 @@ function Blacklist() { >