bobbai00 commented on code in PR #3654:
URL: https://github.com/apache/texera/pull/3654#discussion_r2275631605


##########
core/gui/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html:
##########
@@ -224,6 +241,41 @@ <h6 style="font-weight: lighter; font-size: 0.9em">Choose 
a Version:</h6>
               Version Size: {{ formatSize(currentDatasetVersionSize) }}
             </div>
           </div>
+
+          <!-- Simple README creation in sidebar -->
+          <div *ngIf="userDatasetAccessLevel === 'WRITE' && !hasReadmeFile()" 
class="create-readme-section">
+            <button

Review Comment:
   this button is too wide, can you make it more compact and delicate?



##########
core/gui/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html:
##########
@@ -224,6 +241,41 @@ <h6 style="font-weight: lighter; font-size: 0.9em">Choose 
a Version:</h6>
               Version Size: {{ formatSize(currentDatasetVersionSize) }}
             </div>
           </div>
+
+          <!-- Simple README creation in sidebar -->
+          <div *ngIf="userDatasetAccessLevel === 'WRITE' && !hasReadmeFile()" 
class="create-readme-section">
+            <button
+              nz-button
+              nzType="dashed"
+              nzBlock
+              nzSize="small"
+              (click)="showReadmeForm = !showReadmeForm">
+              <i nz-icon nzType="file-add"></i>
+              {{ showReadmeForm ? 'Cancel' : 'Create README.md' }}
+            </button>
+
+            <!-- README creation form -->
+            <div *ngIf="showReadmeForm">

Review Comment:
   you should try to reuse the file editor component, a separate form seems to 
be redundant



##########
core/gui/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/user-dataset-file-editor/user-dataset-file-editor.component.html:
##########
@@ -0,0 +1,230 @@
+<!--
+ 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.
+-->
+
+<!-- Loading State -->
+<div *ngIf="isLoading" class="file-loading">

Review Comment:
   Few high level comments regarding this component:
   1. Can you merge it with the `file-renderer` component: if a file is 
editable, 
   <img width="82" height="37" alt="Screenshot 2025-08-13 at 11 44 24 PM" 
src="https://github.com/user-attachments/assets/a5fb8afa-2582-42ab-990a-f613820b54ff";
 /> show an edit button. And when users click that button, show the editing 
interface. This can avoid the redundancy file header.
   
   2. I still want you to explore the library way of having the markdown 
editor. Implementing one by ourselves brings high maintenance cost and can be 
error-pruning.
   



-- 
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]

Reply via email to