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

NEW Allow state to be passed back on grid field actions #757

Conversation

ScopeyNZ
Copy link
Contributor

This PR is a benign addition to GridField actions to pass through an "action-state" data attribute (if available) into the request that performs an action. This is targetting 1.3 as it's part of a fix to prevent cramming the session with unnessecary data which doesn't scale well.

See related PR silverstripe/silverstripe-framework#8627

Copy link
Contributor

@robbieaverill robbieaverill left a comment

Choose a reason for hiding this comment

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

LGTM, pending the dependent PR being merged

@ScopeyNZ
Copy link
Contributor Author

I've just noticed there's an issue with GridFieldFilterHeader. Looking into it 😪

@bergice
Copy link
Contributor

bergice commented Nov 22, 2018

Keep in mind we're doing something similar with the betterbuttons port to retain the state for the Previous and Next buttons on the edit form: silverstripe/silverstripe-framework#8569

@ScopeyNZ
Copy link
Contributor Author

Keep in mind we're doing something similar with the betterbuttons port to retain the state for the Previous and Next buttons on the edit form: silverstripe/silverstripe-framework#8569

I think you're using FormActions rather than GridField_FormActions right?

@bergice
Copy link
Contributor

bergice commented Nov 22, 2018

Tests need to be fixed up.

@ScopeyNZ
Copy link
Contributor Author

Looks like PECL was having some problems yesterday. I've restarted the builds

Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

Just did a quick code review. Couldn't fully test because of silverstripe/silverstripe-framework#8627 (review)

client/src/legacy/GridField.js Outdated Show resolved Hide resolved
@ScopeyNZ ScopeyNZ force-pushed the pulls/1.3/may-the-state-be-with-you branch from 1d81386 to 1d5a98f Compare November 28, 2018 01:50
client/src/legacy/GridField.js Outdated Show resolved Hide resolved
@bergice bergice removed their assignment Nov 28, 2018
Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

Let it be merge.

@ScopeyNZ ScopeyNZ force-pushed the pulls/1.3/may-the-state-be-with-you branch from 1d5a98f to 2fda791 Compare November 30, 2018 02:45
@ScopeyNZ
Copy link
Contributor Author

I've just rebased. I don't expect that a rebase will fix the failing builds that aren't related.

I don't have time to address the failing Behat tests within this PR.

@ScopeyNZ
Copy link
Contributor Author

I think I found an issue so please don't merge yet.

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Dec 2, 2018

@ScopeyNZ Have you found/resolve your this new mysterious issue?

@ScopeyNZ
Copy link
Contributor Author

ScopeyNZ commented Dec 2, 2018

Yeah. The issue was the same that is fixed by #765 . Sorry we're good to merge given that's fixed 🙂

@maxime-rainville
Copy link
Contributor

Merging everything before anyone has a chance to say otherwise.

@maxime-rainville maxime-rainville merged commit 38177c0 into silverstripe:1.3 Dec 2, 2018
@robbieaverill
Copy link
Contributor

But....

@robbieaverill robbieaverill deleted the pulls/1.3/may-the-state-be-with-you branch December 2, 2018 22:40
@robbieaverill
Copy link
Contributor

Jokes

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.

4 participants