Browse Source

Merge pull request 'fix keyword search to work for both local and everywhere searches' (#86) from searching into master

Reviewed-on: https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/pulls/86
kb/add-usage-guide
anomalist 12 months ago
parent
commit
714bb169fa
  1. 9
      project.task.yaml
  2. 31
      src/views/DiscoverView.vue
  3. 9
      src/views/HelpView.vue

9
project.task.yaml

@ -1,15 +1,14 @@
tasks: tasks:
- on project view screen, 'contributions' to & from shouldn't fall to next line (eg. Alpha Barbados Beach Cleanup Test) - don't show "Give" & "Offer" on project screen if they don't have an identifier
- allow some gives even if they aren't registered
- in endorser-push-server - mount folder for persistent sqlite DB outside of container - in endorser-push-server - mount folder for persistent sqlite DB outside of container
- 40 notifications : - 40 notifications :
- push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data assignee:matthew - push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data assignee:matthew
- .3 on DiscoverView QuickSearch, the 'keyup.enter' only runs searchAll, so do the right thing for searchLocal
- .5 allow to manage their notifications even without an identity - .5 allow to manage their notifications even without an identity
- .5 bug - on the discover page, enter a search term and search and see a duplicate project show at the end of the list
- 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s) - 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s)
- .3 fix the Project-location-selection map display to not show on top of bottom icons (and any other UI tweaks on the map flow) assignee-group:ui - .3 fix the Project-location-selection map display to not show on top of bottom icons (and any other UI tweaks on the map flow) assignee-group:ui
@ -20,6 +19,7 @@ tasks:
- .5 fix where user 0 sees no txns from user 1 on contacts page but sees them on list page - .5 fix where user 0 sees no txns from user 1 on contacts page but sees them on list page
- .1 remove the logic to exclude beforeId in list of plans after server has commit 26b25af605e715600d4f12b6416ed9fd7142d164 assignee:trent - .1 remove the logic to exclude beforeId in list of plans after server has commit 26b25af605e715600d4f12b6416ed9fd7142d164 assignee:trent
- .2 in SeedBackupView, don't load the mnemonic and keep it in memory; only load it when they click "show" - .2 in SeedBackupView, don't load the mnemonic and keep it in memory; only load it when they click "show"
- fix cert generation (since it didn't happen automatically for Nov 30)
- Discuss whether the remaining tasks are worthwhile before MVP release. - Discuss whether the remaining tasks are worthwhile before MVP release.
@ -35,6 +35,7 @@ tasks:
- .5 remove references to localStorage for projectId (now that it's pulling from the path) - .5 remove references to localStorage for projectId (now that it's pulling from the path)
- bug (that is hard to reproduce) - on the second 'give' recorded on prod it showed me as the agent - bug (that is hard to reproduce) - on the second 'give' recorded on prod it showed me as the agent
- make identicons for contacts into more-memorable faces (and maybe change project identicons, too) - make identicons for contacts into more-memorable faces (and maybe change project identicons, too)
- allow download of each VC (to show that they can actually own their data)
- contacts v+ : - contacts v+ :
- 01 Import all the non-sensitive data (ie. contacts & settings). - 01 Import all the non-sensitive data (ie. contacts & settings).
@ -50,7 +51,7 @@ tasks:
- 08 convert to cleaner implementation (maybe Drie -- https://github.com/janvorisek/drie) - 08 convert to cleaner implementation (maybe Drie -- https://github.com/janvorisek/drie)
- Release Minimum Viable Product : - Release Minimum Viable Product :
- .5 deploy endorser.ch server above v 3.4.3 (to get plan searches by names as well as descriptions) - .5 deploy endorser.ch server above Dec 1 (to get plan searches by names as well as descriptions)
- 08 thorough testing for errors & edge cases - 08 thorough testing for errors & edge cases
- 01 ensure ability to recover server remotely, and add redundant access - 01 ensure ability to recover server remotely, and add redundant access
- Turn off stats-world or ensure it's usable (eg. cannot zoom out too far and lose world, cannot screenshot). - Turn off stats-world or ensure it's usable (eg. cannot zoom out too far and lose world, cannot screenshot).

31
src/views/DiscoverView.vue

@ -9,7 +9,7 @@
</h1> </h1>
<!-- Quick Search --> <!-- Quick Search -->
<div id="QuickSearch" class="mb-4 flex" v-on:keyup.enter="searchAll()"> <div id="QuickSearch" class="mb-4 flex" v-on:keyup.enter="searchSelected()">
<input <input
type="text" type="text"
v-model="searchTerms" v-model="searchTerms"
@ -17,7 +17,7 @@
class="block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2" class="block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2"
/> />
<button <button
@click="searchAll()" @click="searchSelected()"
class="px-4 rounded-r bg-slate-200 border border-l-0 border-slate-400" class="px-4 rounded-r bg-slate-200 border border-l-0 border-slate-400"
> >
<fa icon="magnifying-glass" class="fa-fw"></fa> <fa icon="magnifying-glass" class="fa-fw"></fa>
@ -41,8 +41,10 @@
Nearby Nearby
<span <span
class="font-semibold text-sm bg-slate-200 px-1.5 py-0.5 rounded-md" class="font-semibold text-sm bg-slate-200 px-1.5 py-0.5 rounded-md"
>{{ localCount > -1 ? localCount : "?" }}</span v-if="isLocalActive"
> >
{{ localCount > -1 ? localCount : "?" }}
</span>
</a> </a>
</li> </li>
<li> <li>
@ -59,8 +61,10 @@
Anywhere Anywhere
<span <span
class="font-semibold text-sm bg-slate-200 px-1.5 py-0.5 rounded-md" class="font-semibold text-sm bg-slate-200 px-1.5 py-0.5 rounded-md"
>{{ remoteCount > -1 ? remoteCount : "?" }}</span v-if="isRemoteActive"
> >
{{ remoteCount > -1 ? remoteCount : "?" }}
</span>
</a> </a>
</li> </li>
</ul> </ul>
@ -156,12 +160,12 @@ export default class DiscoverView extends Vue {
apiServer = ""; apiServer = "";
searchTerms = ""; searchTerms = "";
projects: ProjectData[] = []; projects: ProjectData[] = [];
isLoading = false;
isLocalActive = true; isLocalActive = true;
isRemoteActive = false; isRemoteActive = false;
localCount = -1; localCount = -1;
remoteCount = -1; remoteCount = -1;
searchBox: { name: string; bbox: BoundingBox } | null = null; searchBox: { name: string; bbox: BoundingBox } | null = null;
isLoading = false;
// make this function available to the Vue template // make this function available to the Vue template
didInfo = didInfo; didInfo = didInfo;
@ -188,6 +192,19 @@ export default class DiscoverView extends Vue {
} }
} }
public resetCounts() {
this.localCount = -1;
this.remoteCount = -1;
}
public async searchSelected() {
if (this.isLocalActive) {
await this.searchLocal();
} else {
await this.searchAll();
}
}
public async buildHeaders(): Promise<HeadersInit> { public async buildHeaders(): Promise<HeadersInit> {
const headers: HeadersInit = { const headers: HeadersInit = {
"Content-Type": "application/json", "Content-Type": "application/json",
@ -213,6 +230,8 @@ export default class DiscoverView extends Vue {
} }
public async searchAll(beforeId?: string) { public async searchAll(beforeId?: string) {
this.resetCounts();
if (!beforeId) { if (!beforeId) {
// this was an initial search so clear any previous results // this was an initial search so clear any previous results
this.projects = []; this.projects = [];
@ -280,6 +299,8 @@ export default class DiscoverView extends Vue {
} }
public async searchLocal(beforeId?: string) { public async searchLocal(beforeId?: string) {
this.resetCounts();
if (!this.searchBox) { if (!this.searchBox) {
this.projects = []; this.projects = [];
return; return;

9
src/views/HelpView.vue

@ -189,6 +189,15 @@
</a> </a>
</p> </p>
<h2 class="text-xl font-semibold">Where can I read more?</h2>
<p>
This is part of the
<a href="https://livesofgiving.org" class="text-blue-500">
Lives of Giving
</a>
initiative.
</p>
<h2 class="text-xl font-semibold">What app version is this?</h2> <h2 class="text-xl font-semibold">What app version is this?</h2>
<p> <p>
{{ package.version }} {{ package.version }}

Loading…
Cancel
Save