Skip to content

Commit

Permalink
Merge pull request #4076 from mathesar-foundation/todo_beta_code_comm…
Browse files Browse the repository at this point in the history
…ents

Remove TODO_BETA code comments
  • Loading branch information
pavish authored Dec 24, 2024
2 parents cf3ddd4 + 36bce93 commit 9840e61
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
function makeBreadcrumbSelectorItem(schema: Schema): BreadcrumbSelectorEntry {
return {
type: 'simple',
// TODO_BETA: Make label a store
// TODO: Make label a store
label: get(schema.name),
href: getSchemaPageUrl(database.id, schema.oid),
icon: iconSchema,
Expand Down
2 changes: 1 addition & 1 deletion mathesar_ui/src/contexts/DatabaseSettingsRouteContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class DatabaseSettingsRouteContext {
* When a configured role is removed from the Role Configuration page,
* Collaborators list needs to be reset, since the drop statement cascades.
*
* TODO_BETA: Discuss on whether we should cascade or throw error?
* TODO: Discuss on whether we should cascade or throw error?
*/
this.collaborators.reset();
}
Expand Down
5 changes: 4 additions & 1 deletion mathesar_ui/src/pages/database/DatabasePageWrapper.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@
<ButtonMenuItem icon={iconDeleteMajor} on:click={disconnectDatabase}>
{$_('disconnect_database')}
</ButtonMenuItem>
<!-- TODO_BETA: Allow dropping databases -->
<!--
TODO: Allow dropping databases
https://github.com/mathesar-foundation/mathesar/issues/3862
-->
<!-- {#if isDatabaseInInternalServer}
<ButtonMenuItem
icon={iconDeleteMajor}
Expand Down
4 changes: 0 additions & 4 deletions mathesar_ui/src/stores/table-data/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ export class ColumnsDataStore extends EventHandler<{
try {
this.fetchStatus.set({ state: 'processing' });
this.promise?.cancel();
// TODO_BETA: For some reason `...this.shareConsumer?.getQueryParams()`
// was getting passed into the API call when it was REST. I don't know
// why. We need to figure out if this is necessary to replicate for the
// RPC call.
this.promise = api.columns
.list_with_metadata({ ...this.apiContext })
.run();
Expand Down
9 changes: 0 additions & 9 deletions mathesar_ui/src/stores/table-data/constraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,8 @@ export class ConstraintsDataStore implements Writable<ConstraintsData> {

try {
this.promise?.cancel();

// TODO_BETA Do we need shareConsumer here? Previously we had been
// passing:
//
// ```
// ...this.shareConsumer?.getQueryParams()
// ```
this.promise = api.constraints.list(this.apiContext).run();

const constraints = await this.promise;

const storeData: ConstraintsData = { state: States.Done, constraints };
this.set(storeData);
return storeData;
Expand Down
2 changes: 0 additions & 2 deletions mathesar_ui/src/stores/table-data/records.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,6 @@ export class RecordsData {
.withEntries(contextualFilterEntries)
.recordsRequestParams(),
return_record_summaries: this.loadIntrinsicRecordSummaries,
// TODO_BETA Do we need shareConsumer here? Previously we had been
// passing `...this.shareConsumer?.getQueryParams()`
};

const fuzzySearchParams = params.searchFuzzy.getSearchParams();
Expand Down
12 changes: 3 additions & 9 deletions mathesar_ui/src/systems/data-explorer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,15 +489,9 @@ export function speculateColumnMetaData({
type_options:
aggregation.function === 'distinct_aggregate_to_array'
? {
// TODO_BETA: Ask Pavish.
//
// `Column['type_options']` was previously typed loosely
// as `Record<string, unknown> | null`. Now it's more
// strict and it doesn't have a `type` property.
//
// type:
// updatedColumnsMetaData.get(aggregation.inputAlias)
// ?.column.type ?? 'unknown',
item_type:
updatedColumnsMetaData.get(aggregation.inputAlias)
?.column.type ?? 'unknown',
}
: null,
metadata: null,
Expand Down
2 changes: 1 addition & 1 deletion mathesar_ui/src/systems/table-view/row/RowCell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
$: hasError = !!errors.length;
$: isProcessing = modificationStatus?.state === 'processing';
$: isTableEditable = currentRoleTablePrivileges.has('UPDATE');
// TODO_BETA: Handle case where INSERT is allowed, but UPDATE isn't
// TODO: Handle case where INSERT is allowed, but UPDATE isn't
// i.e. row is a placeholder row and record isn't saved yet
$: isEditable =
isTableEditable &&
Expand Down

0 comments on commit 9840e61

Please sign in to comment.