aglinxinyuan commented on code in PR #9376:
URL: https://github.com/apache/texera/pull/9376#discussion_r4520460369
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-version-creator/user-dataset-version-creator.component.ts:
##########
@@ -38,7 +38,7 @@ import { contributorFieldGroup } from
"../user-dataset-contributor-editor/contri
@UntilDestroy()
@Component({
selector: "texera-user-dataset-version-creator",
- templateUrl: "./user-dataset-version-creator.component.html",
+ templateUrl: "../../../resource-creator/resource-creator-form.html",
Review Comment:
Done in 78fb8720e5: both creators now render
`<texera-resource-creator-form>`, with inputs for the form, model and flags,
outputs for both switches and both buttons, and its styles next to its
template. The one visible change is that the model creator's Create button now
hovers in the dataset creator's `#0062cc` instead of `#0069d9`.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
##########
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-version-creator/user-dataset-version-creator.component.ts:
##########
@@ -70,6 +70,15 @@ export class UserDatasetVersionCreatorComponent implements
OnInit {
// boolean to control if is uploading
isCreating: boolean = false;
+ readonly creatorForm = {
+ formClass: "texera-user-dataset-creator-form",
+ togglesClass: "dataset-toggles",
+ model: () => this.model,
+ showToggles: () => !this.isCreatingVersion,
+ publicStatus: () => this.isDatasetPublic,
+ downloadableStatus: () => this.isDatasetDownloadable,
+ };
Review Comment:
The adapter went away with the component in 78fb8720e5: each creator binds
its own members to the component's inputs, and the component's template uses
one static class per element in place of `formClass` and `togglesClass`.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
##########
frontend/src/app/dashboard/component/user/resource-creator/resource-creator-form.html:
##########
@@ -23,27 +23,27 @@
nzSize="large"
nzTip="Creating...">
<div
- class="texera-user-dataset-creator-form"
+ [class]="creatorForm.formClass"
[ngClass]="{'disabled-backdrop': isCreating}">
Review Comment:
Dropped in 78fb8720e5, along with both `NgClass` imports.
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
##########
frontend/src/app/dashboard/component/user/_resource-form-shared.scss:
##########
@@ -0,0 +1,75 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+@mixin editor-layout($form-selector, $primary-selector, $cancel-margin-top,
$primary-hover: darken(#007bff, 10%)) {
Review Comment:
Done in 78fb8720e5: the partial now uses `color.adjust(…, $lightness: -10%)`
with `@use "sass:color"`, and the compiled hover colors match main's (`#0062cc`
and `#cc0000`).
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]