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

implement useImportAccount and useExportAccount with progress display #4

Open
estebanabaroa opened this issue Aug 27, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@estebanabaroa
Copy link
Member

estebanabaroa commented Aug 27, 2023

the API should be something like

export interface UseImportAccountOptions extends Options {
  account?: string
   // let the user not import votes, comments, edits if they dont want, since it's slow, all default to true
  votes?: boolean
  comments?: boolean
  edits?: boolean
}
export interface UseImportAccountResult extends Result {
  importedAccount: Account | undefined
  importAccount(): Promise<void>
  // use these numbers to display progress, importing is slow so must display progress
  // if votes, comments or edits option is false, count should be 0
  voteCount: number
  importedVoteCount: number
  commentCount: number
  importedCommentCount: number
  editCount: number
  importedEditCount: number
}

export interface UseExportAccountOptions extends Options {
   // let the user not import votes, comments, edits if they dont want, since it's slow, all default to true
  votes?: boolean
  comments?: boolean
  edits?: boolean
}
export interface UseExportAccountResult extends Result {
  exportedAccount: string | undefined
  exportAccount(): Promise<void>
  // use these numbers to display progress, importing is slow so must display progress
  // if votes, comments or edits option is false, count should be 0
  voteCount: number
  importedVoteCount: number
  commentCount: number
  importedCommentCount: number
  editCount: number
  importedEditCount: number
}
@estebanabaroa estebanabaroa changed the title importing/exporting accounts with lots of comments is really slow, it probably needs a progress hook implement useImportAccount and useExportAccount with progress display Sep 7, 2023
@estebanabaroa estebanabaroa added good first issue Good for newcomers help wanted Extra attention is needed enhancement New feature or request labels Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant