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

More detailed commandStack events #486

Closed
wants to merge 1 commit into from
Closed

More detailed commandStack events #486

wants to merge 1 commit into from

Conversation

PabloDons
Copy link

Closes #479

I haven't rigorously tested it, but it seems stable for my usage. I have only used the execute method, but I went ahead and added undo, redo and clear to make it a complete feature.

@CLAassistant
Copy link

CLAassistant commented Sep 7, 2020

CLA assistant check
All committers have signed the CLA.

@PabloDons
Copy link
Author

Is this an issue with my code? I don't see any problems


dirty.length = 0;

this._fire('changed');
this._fire('changed', assign({ method: method, actions: execution.executed }, { context }));
Copy link
Contributor

@pinussilvestrus pinussilvestrus Sep 7, 2020

Choose a reason for hiding this comment

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

I guess the build is failing because you use unsupported JS syntax.

{ context }

The shorthand object initializer is an es6 feature and therefore not available for older browsers. Better would be

{ context: context }

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Sep 7, 2020

Thanks a lot first for your contribution! I appreciate it very much that you're trying to implement this feature on your own. 👍

We will discuss in the team how to handle your proposal. In the meantime, can you change your pull request structure to fit our guidelines? Especially test cases which test the new features and a formatted git commit message would be very appreciated.

Comment on lines +949 to +950
// Need to figure out a way to indicate the executed actions
expect(actions).to.eql(['pre-command', 'complex-command', 'post-command']);
Copy link
Author

Choose a reason for hiding this comment

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

This one has an issue though, that I discovered when making tests (I skipped the relevant test because it fails). The redo action doesn't indicate the executed actions. I can't figure out a graceful way to do this, so I would appreciate a nudge in the right direction!

@barmac
Copy link
Member

barmac commented Oct 1, 2020

I am closing this until we figure out what we actually want to have.

@barmac barmac closed this Oct 1, 2020
@PabloDons
Copy link
Author

PabloDons commented Oct 27, 2020

I have amended the pull-request as I described in the related issue. Now it will only indicate the change method (execute, undo, redo, or clear). I apologize for the delay.

I see however that the pull-request didn't update. Is this because it is closed?

@nikku
Copy link
Member

nikku commented Nov 3, 2020

I see however that the pull-request didn't update. Is this because it is closed?

Apparently you force pushed or updated the develop branch, that is why you cannot reopen the PR.

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.

Command stack change event should be more detailed.
5 participants