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

Add ability to remove/reset optional variables in fruitsalad #3675

Closed

Conversation

Vayras
Copy link

@Vayras Vayras commented Aug 23, 2023

This is my attempt to resolve the #3674 issue

@willgearty willgearty self-requested a review August 26, 2023 16:15
Copy link
Member

@willgearty willgearty left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this pull request @Vayras! I've left some comments, please let me know if you have any questions.

Comment on lines -57 to -68
$j('#addToPalette').click(function(){
var newColor = $j('<input>');
newColor.addClass('palette');
newColor.attr({
name: 'palette',
type: 'text',
value: 'black'
});
$j('#palette_custom_div').append(newColor);
$j('#palette_custom_div').append(" ");
showCustomPalette();
});
Copy link
Member

Choose a reason for hiding this comment

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

Is there a particular reason that you removed this? Removing this breaks the ability to make a custom palette.

Comment on lines +84 to +87
// Create the "Reset Color" button
var resetButton = $j('<button class="reset-color">Reset Color</button>').click(function() {
colorInput.spectrum("set", "#000000"); // Reset color to default
});
Copy link
Member

Choose a reason for hiding this comment

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

Adding this button is great, but I think we really want a way to remove the optional variables, not to just reset them to black.

Comment on lines +84 to +87
// Create the "Reset Color" button
var resetButton = $j('<button class="reset-color">Reset Color</button>').click(function() {
colorInput.spectrum("set", "#000000"); // Reset color to default
});
Copy link
Member

Choose a reason for hiding this comment

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

By default, buttons are "type=submit", so whenever you click a "Reset Color", it submits the form, discarding any changes that have been made.

Comment on lines +84 to +87
// Create the "Reset Color" button
var resetButton = $j('<button class="reset-color">Reset Color</button>').click(function() {
colorInput.spectrum("set", "#000000"); // Reset color to default
});
Copy link
Member

Choose a reason for hiding this comment

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

Ideally we would also have similar buttons next to the optional variables that exist on page load.

@willgearty
Copy link
Member

willgearty commented Nov 20, 2023

Superseded by #3696.

@willgearty willgearty closed this Nov 20, 2023
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