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

DataFlow backfill - disabled but most of the functionality is there #1261

Merged
merged 70 commits into from
Sep 25, 2024

Conversation

travjenkins
Copy link
Member

@travjenkins travjenkins commented Sep 19, 2024

Issues

completes #1267
contributes #1220
contributes #310

Changes

1220

  • Started making calls in almost all the steps
  • Better error handling VS server failures
  • Updating content as requested
  • Adding a new review selections step
  • Adding the job status into the step
  • Showing draft errors

1267

  • Updated the count to just be the enabled collections

310

  • More work done on the spec diff and showing a "What's changed" table that is the basis of more comparison

misc

  • Some quick refactoring on how we store entity properties
  • scrolling down chip lists a tiny bit when showing all
  • Removing description from the details form. This will eventually be put into the presave prompt

Tests

Manually tested

  • While working on the new feature - a TON of testing the new modal.
  • After disabling new stuff just ran through Capture and Materialization creation and editing

Automated tests

  • unit testing covered

Playwright tests ran locally

  • Admin
  • Captures
  • Collections
  • HomePage
  • Login
  • Materialization

Screenshots

When opening chiplist we will scroll down a few pixels to try to get more chips to slightly show to hopefully make it clear to users that they can scroll
image

Added some clarification text
image

Calling intl for translations
Moving label into store to reduce duplication
Adding a running handler into parent
Switching to uses as single status property
Getting capture disable wired up
handling errors a bit better
updating enum
Closing when "back" button is clicked on first step
No longer making steps options just defaulting to empty
Just setting show to false is enough for closing dialog
Checking the shallow `onFirstStep` to reduce renders
Moving context out to the main store
Only running initialize once per hydration
Wiring up most of the steps (without waiting for no data)
Support passing in 'sx' so we can override styling when needed
Scrolling the element down a little bit when all items are shown
Starting work on handling errors better
Trying to get publication populated correctly
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought I was going to reuse this and ended up not. However, no real harm in keeping it broken out.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved from a single file to a component folder and using the new "shared" Content up above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New concept to keep the index while in a loop. So you don't have to drill index down

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing to override because the presave prompt will have a link to details for a capture, collection, and materialization.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently going to only allow matching on the sourceCapture as that is the safest query

@@ -311,18 +311,35 @@ export function invokeSupabase<T>(fn: FUNCTIONS, body: any) {
);
}

export const insertSupabase = (
export const insertSupabase = <T = any>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting to add some support for typing

Comment on lines +324 to +325
if (!noResponse) {
return query.select();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where we handle not always including the select to fetch everything like V1

Comment on lines +460 to +462
export const JOB_TYPE_EMPTY = 'emptyDraft';
export const JOB_TYPE_FAILURE = 'buildFailed';
export const JOB_TYPE_SUCCESS = 'success';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to be able to check specific statuses if needed.

Comment on lines +421 to +424
getEnabledCollections: () =>
Object.values(get().resourceConfigs)
.filter(({ meta }) => !meta.disable)
.map(({ meta }) => meta.collectionName),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not really using the collectionName mapping part - but left it in so it matches the getCollections up above.

<Title />
<Content />
<Actions />
<PromptsHydrator>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting the hydrator inside the dialog so that it is always reset when it is shown/hidden

Comment on lines +5 to +9
// interface DisableCaptureStepContext {
// pubId: string | null;
// captureSpec: JSON | null;
// captureName: string | null;
// }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will eventually be combined into the context in the store

Comment on lines +40 to +42
if (loading) {
return <Skeleton />;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the loading state to inside the selector. This way the selector can also handle the "empty" state which needs to eventually allow steps to be skipped.

@travjenkins travjenkins added the change:planned This is a planned change label Sep 25, 2024
@travjenkins travjenkins marked this pull request as ready for review September 25, 2024 03:55
@travjenkins travjenkins requested a review from a team as a code owner September 25, 2024 03:55
Copy link
Member

@kiahna-tucker kiahna-tucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an issue with the backfilled binding logic that needs to be addressed before this PR can be merged.

Typing the ref
Including the current top height when scrolling
Switching out format components
Copy link
Member

@kiahna-tucker kiahna-tucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a small, content typo called out below.

src/lang/en-US/Workflows.ts Outdated Show resolved Hide resolved
Copy link
Member

@kiahna-tucker kiahna-tucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with moderate, happy path testing.

@travjenkins travjenkins merged commit 7bbb7d6 into main Sep 25, 2024
3 checks passed
@travjenkins travjenkins deleted the travjenkins/feature/full-entity-refresh/server-calls branch September 25, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:planned This is a planned change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants