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

Allow capture templates to insert at beginning or end of file #324

Merged
merged 9 commits into from
Jun 14, 2020

Conversation

aspiers
Copy link

@aspiers aspiers commented Jun 4, 2020

Currently based on #344 (eslint PR) so that I can use eslint to verify the changes are clean. Now rebased

If no headers are in the header path list, insert at the end of the file, or the beginning if the Prepend option is set.

Lightly tested.

@aspiers aspiers force-pushed the capture-bof-eof branch 2 times, most recently from 00a999a to aaf564e Compare June 9, 2020 18:12
@aspiers
Copy link
Author

aspiers commented Jun 9, 2020

Added tests and rebased on my eslint branch so that I could use eslint.

@aspiers
Copy link
Author

aspiers commented Jun 9, 2020

@munen I can't figure out why this undoable test is failing - any ideas?

@munen
Copy link
Collaborator

munen commented Jun 9, 2020

@munen I can't figure out why this undoable test is failing - any ideas?

Wow, you're asking about a failing test in a 42 changes PR that I haven't looked at, yet, because it's marked as a draft. No, at this point, I also don't know why the test is failing, but it looks to be the last commit(;

Yeah, I know, that's not helping at all. Sorry about that.

What about splitting the PR into two - one that you've manually verified and tested and that we can review. And another one adding more tests on top of and see what's going on? This particular PR seems to have a lot of changes that are not directly related to the title of it.

@aspiers aspiers force-pushed the capture-bof-eof branch 4 times, most recently from 222a8cd to 22a693b Compare June 9, 2020 19:44
@aspiers
Copy link
Author

aspiers commented Jun 10, 2020

@munen commented on June 9, 2020 7:39 PM:

@munen I can't figure out why this undoable test is failing - any ideas?

Already discussed on Matrix, but just for the record in case anyone else is reading here:

Wow, you're asking about a failing test in a 42 changes PR that I haven't looked at, yet, because it's marked as a draft.

As mentioned, the vast majority of these changes are because it's based on (an old version of) my eslint branch. Only the top few commits are relevant, and all but one of these are tiny.

No, at this point, I also don't know why the test is failing, but it looks to be the last commit(;

Yeah, I know, that's not helping at all. Sorry about that.

What about splitting the PR into two - one that you've manually verified and tested and that we can review. And another one adding more tests on top of and see what's going on?

No need - the eslint branch was fully passing and unrelated to this.

This particular PR seems to have a lot of changes that are not directly related to the title of it.

Yep, as explained above, I wanted to be able to use eslint when working on this branch.

Unfortunately after a lot more experiments, I still have zero clue why the final undo test is failing. As agreed on Matrix, we'll just skip that test for now :-/

Adam Spiers added 5 commits June 12, 2020 01:44
This will allow us to check individual headers in some upcoming tests.
A tighter scope will allow us to write more tests with different
stores.
Make it clearer what is the second argument passed to the org reducer.
@aspiers aspiers marked this pull request as ready for review June 12, 2020 00:58
@aspiers
Copy link
Author

aspiers commented Jun 12, 2020

Now rebased and ready for review.

Copy link
Collaborator

@schoettl schoettl left a comment

Choose a reason for hiding this comment

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

Looks good to me, cool new feature!

src/reducers/org.unit.test.js Show resolved Hide resolved
src/reducers/org.js Show resolved Hide resolved
src/reducers/org.js Outdated Show resolved Hide resolved
If no headers are in the header path list, insert at the end of the
file, or the beginning if the Prepend option is set.
expect(last.get('rawDescription')).toEqual('Some description\n');
});

it.skip('is undoable', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand why, yet, but the problem seems to be a racing condition or mutable state somewhere. When only executing this test, it works fine.

@munen
Copy link
Collaborator

munen commented Jun 14, 2020

Cool new feature, indeed!

I've added some docs to sample.org, documented the skipped test (and allowed it in eslint) and added attribution in the changelog.

Good work, @aspiers 🙏

@munen munen merged commit 6c82938 into 200ok-ch:master Jun 14, 2020
@aspiers aspiers deleted the capture-bof-eof branch July 10, 2020 21:03
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