Skip to content

Conversation

@Prashant-Bharaj
Copy link

Description

Describe what this PR does. If modifying behavior, explain the current and new behavior, along with the motivation.

Related Issues

Type of Change

  • Feature: New functionality without breaking existing features.
  • 🛠️ Bug fix: Resolves an issue without altering current behavior.
  • 🧹 Refactor: Code reorganization, no behavior change.
  • Breaking: Alters existing functionality and requires updates.
  • 🧪 Tests: New or modified tests
  • 📝 Documentation: Updates or additions to documentation.
  • 🗑️ Chore: Routine tasks, or maintenance.
  • Build configuration change: Build/configuration changes.

@CatHood0
Copy link
Collaborator

CatHood0 commented Mar 30, 2025

Can you give us a better description of what this PR is doing?

@CatHood0 CatHood0 requested a review from EchoEllet March 30, 2025 20:20
Copy link
Collaborator

@CatHood0 CatHood0 left a comment

Choose a reason for hiding this comment

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

This PR seems to be adding a lot of stuff without explaining anything, and just seems to bloat the spaghetti code.

Please, make sure you document what this PR does and the motivation behind it.

I'm pretty unsure if, even knowing what this PR does, we should merge it.

@EchoEllet
Copy link
Collaborator

This PR seems to be adding a lot of stuff without explaining anything, and just seems to bloat the spaghetti code.

Yes, it doesn't confirm with the current code. For example, the button parameters are added directly without options class.

I appreciate the contribution, but it shouldn't be merged, at least with the current state.

Copy link
Collaborator

@EchoEllet EchoEllet left a comment

Choose a reason for hiding this comment

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

I think an issue should be filled before working on big PRs since there is a high chance that it gets closed, as explained in the README.

I appreciate your time, but I'm uncertain if this PR should be merged.

Attribute.list.key,
Attribute.codeBlock.key,
Attribute.blockQuote.key,
Attribute.qaBlock.key,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't confirm to Quill Delta and is not supported. It should be disabled by default or provided in an external package.

Comment on lines +1 to +18
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart' as quill;
import 'package:flutter_quill/flutter_quill.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final _controller = quill.QuillController.basic();

return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Text Editor'),
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should have one minimal example instead of many, I don't think many will run this example as it's not clear to discover.

'h1': (_) => [Attribute.h1],
'h2': (_) => [Attribute.h2],
'h3': (_) => [Attribute.h3],
'qa-block': (_) => [Attribute.qaBlock], // Added QABlockAttribute here
Copy link
Collaborator

Choose a reason for hiding this comment

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

The markdown package support is discounted and will be removed in future releases.

),
);

// Check if the current line is a QA Block and needs a separator
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't add comments that explain code that's self-explanatory unless they add something.

It doesn't make sense to have this comment, for example:

// This prints the result of 1 + 1 to the debug console
print(1 + 1)

Too many comments would bloat the code and make the code more difficult to read.

),
child: Column(
children: [
QABlockSeparator(), // Custom widget for separator
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment is also unnecessary.

import 'package:flutter_quill/flutter_quill.dart';

import '../../models/documents/nodes/container.dart';
import '../others/box.dart'; // Adjust the import according to your project structure
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this a comment?

feedback: Material(
child: Opacity(
opacity: 0.7,
child: child, // Display the dragged widget with some transparency
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are many comments that needs to be removed or adjusted.

import '../../../../../flutter_quill.dart';
import '../../../../models/documents/attribute.dart';

class MinimalColorButton extends StatefulWidget {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The naming is inconsistent with the current naming. This shouldn't be part of the public API.

@EchoEllet
Copy link
Collaborator

EchoEllet commented Apr 18, 2025

Thank you for your contribution.

Closing the PR as it's not very clear what this PR aims to do.

Also, the code is inconsistent, I think some of the changes were automated using AI although I'm not quite sure.

@EchoEllet EchoEllet closed this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants