Updates to contacts UI. Sweep for buildIdentity and buildHeaders #35

Merged
anomalist merged 7 commits from contacts-identity into master 1 year ago
anomalist commented 1 year ago
Owner

@trentlarson I added a case to Contacts to show a message when no contacts. Also added a (no name) to the Home page since the buttons didn't cover that case.

Rest of this commit is a partial cleanup of identity and header creations. There's an edge case where it's checking for accounts which I didn't cover just yet.

@trentlarson I added a case to Contacts to show a message when no contacts. Also added a (no name) to the Home page since the buttons didn't cover that case. Rest of this commit is a partial cleanup of identity and header creations. There's an edge case where it's checking for accounts which I didn't cover just yet.
anomalist added 1 commit 1 year ago
anomalist added 1 commit 1 year ago
anomalist added 1 commit 1 year ago
trentlarson requested changes 1 year ago
await accountsDB.open();
const accounts = await accountsDB.accounts.toArray();
this.numAccounts = accounts.length;
Poster
Owner

This cuts some extra code: in this case the "this.numAccounts" isn't set and so the "Switch Identifier" section does not show. (I looked for others and didn't see anything obvious but it's worth another look.)

This cuts some extra code: in this case the "this.numAccounts" isn't set and so the "Switch Identifier" section does not show. (I looked for others and didn't see anything obvious but it's worth another look.)
Poster
Owner

@trentlarson going to push something after this message. I did a little thinking and approach this in a different way.

@trentlarson going to push something after this message. I did a little thinking and approach this in a different way.
anomalist marked this conversation as resolved
trentlarson reviewed 1 year ago
if (!identity) {
throw new Error(
"Attempted to load Give records with no identity available.",
Poster
Owner

Note that this message doesn't really apply on this page. The original has the more generic: "An ID is chosen but there are no keys for it so it cannot be used to talk with the service." Recommend making some more generic message for all these cases if you want to keep the same error message for them all.

Note that this message doesn't really apply on this page. The original has the more generic: "An ID is chosen but there are no keys for it so it cannot be used to talk with the service." Recommend making some more generic message for all these cases if you want to keep the same error message for them all.
anomalist marked this conversation as resolved
trentlarson reviewed 1 year ago
this.limitsMessage = data?.error?.message || "Bad server response.";
if (
error.message ===
"Attempted to load Give records with no identity available."
Poster
Owner

Someday we can have a specific error type, rather than relying on a message string check. Not critical now.

Someday we can have a specific error type, rather than relying on a message string check. Not critical now.
anomalist marked this conversation as resolved
trentlarson reviewed 1 year ago
if (!identity) {
throw new Error(
"Attempted to load Give records with no identity available.",
Poster
Owner

Here's another case where the message about "Give records" is not appropriate for this screen.

Here's another case where the message about "Give records" is not appropriate for this screen.
anomalist marked this conversation as resolved
trentlarson reviewed 1 year ago
}
}
createAndSubmitGive(
Poster
Owner

Thanks for cutting out this moved stuff!

Thanks for cutting out this moved stuff!
anomalist marked this conversation as resolved
anomalist added 1 commit 1 year ago
anomalist added 1 commit 1 year ago
anomalist added 1 commit 1 year ago
anomalist added 1 commit 1 year ago
anomalist merged commit 81dd6eb595 into master 1 year ago

Reviewers

trentlarson requested changes 1 year ago
The pull request has been merged as 81dd6eb595.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.