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

feat: support toggling dragged piece shadows #55

Closed
wants to merge 1 commit into from

Conversation

anthisse
Copy link

@anthisse anthisse commented Oct 2, 2024

This is needed to implement toggling the shadows underneath dragged pieces as proposed in lichess-org/mobile#977

@@ -94,6 +95,9 @@ class ChessboardSettings {
// Offset for the piece currently under drag
final Offset dragFeedbackOffset;

/// Whether the dark shadow under dragged pieces is enabled
Copy link
Collaborator

Choose a reason for hiding this comment

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

Dark shadow sounds a bit ominous. What about "the shadow circle"?

@@ -94,6 +95,9 @@ class ChessboardSettings {
// Offset for the piece currently under drag
final Offset dragFeedbackOffset;

/// Whether the dark shadow under dragged pieces is enabled
final bool pieceShadow;
Copy link
Collaborator

Choose a reason for hiding this comment

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

pieceShadow can be confused with regular shadows of the pieces; so it should be renamed: draggedPieceShadow for instance.

@@ -247,6 +256,9 @@ class ChessboardEditorSettings {
// Offset for the piece currently under drag.
final Offset dragFeedbackOffset;

// Whether the dark shadow under dragged pieces is enabled.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as above. Also it should be a triple slash (not double).

@@ -169,21 +170,21 @@ class _BoardState extends State<Chessboard> {
Widget build(BuildContext context) {
final colorScheme = widget.settings.colorScheme;
final ISet<Square> moveDests = widget.settings.showValidMoves &&
selected != null &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why these indentation changes? Please format your code with dart format.

@veloce
Copy link
Collaborator

veloce commented Nov 19, 2024

Superseded with #59

@veloce veloce closed this Nov 19, 2024
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.

2 participants