Repository navigation
The decks this library writes are valid OOXML, a gate keeps them that way, and 0.3.1 carries it - #43
Merged
Merged
Conversation
The patch this package applies is the difference between PHPPresentation 1.2.0 and upstream's branch, and the branch has moved: a chart's series is now written in the order the schema names it — the shape properties right after the title rather than after the data points and the data labels, and the separator of the data labels of a doughnut before the leader lines rather than after them. PowerPoint repairs a chart written the other way round before it opens it. So the patch is regenerated against the branch that carries the fix, and the commit it is pinned to in the manifest moves with it. Nothing this library draws changes: it writes no chart, and the patch is upstream's branch whole.
…'s validator reads Nothing in the suite could see that a deck is outside the schema. The decks were checked against the parts they carry, and a deck whose XML is outside the schema passes every one of those checks and opens in PowerPoint as `[Repaired]`. The gate is Microsoft's own validator — the one the Open XML SDK Productivity Tool uses — run over every deck the library writes. It is a program in `tools/ooxml-validator/` rather than a dependency: nothing that ships with the library needs it, and the suite runs without it. A machine with no .NET SDK says what is missing and skips the test, because a green tick for a check that never ran is a check nobody made; the job that runs the gate installs the SDK, so it cannot skip itself there. The decks are the ones the gallery is built from, and the plan of them is the file the script that writes them holds it in: `examples/decks.php`. A list of its own in the test would be a second answer to a question that already has one, and the two would drift — a deck the gallery no longer builds and the gate still checks, which is the worse of the two.
A machine whose Imagick cannot draw a letter cannot draw the diagram either, and the library refuses the picture rather than writing a deck with a drawing that has lost its words. So the deck that carries a vector cannot be written on such a machine, and a gate that wrote it nowhere would check one deck fewer than the gallery holds and say nothing about it. It is a test of its own now, so that a run names the deck it did not check rather than passing quietly. The rest of the gallery is checked all the same, and the job in continuous integration says whether the .NET SDK is there rather than leaving the gate to skip itself.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The changelog gains a heading for the version, which is what the release job reads the release notes out of, and a link reference for it.
The tag is the maintainer's to cut:
This release carries the patch that writes a chart's series in the order the schema names
them, and the gate that keeps every deck the library writes valid.
The issue it fixes is PHPPresentation#695,
"PowerPoint presentation document needs repairing when using charts", and the pull request
that carries the fix upstream is
#1044. A deck is repaired because
a chart's series is written with its shape properties after its data points and its data
labels, where the schema names them right after the title.
Three more chart defects, found by the review of that pull request, are in the patch
as well, and the gate now knows about them:
The first of the three was a file outside the schema — a chart with a category axis
that had a major unit of 2.5 carried
<c:tickLblSkip val="2.5"/>, and the SDK refused it.The other two were absences: a chart that is missing a data point is a valid chart, and
the validator reads what is there and says nothing about what is not.
So the gate grew a corpus of charts. This library writes no charts — a deck of
Markdown is slides, shapes, text and pictures — but it carries a patch of the library
that writes them, and a patch that is re-rolled without a fix is a patch that has lost
it. The charts are written through the patched library, and the gate checks two things
about them: that the file is within the schema, which the validator reads, and that it
carries what it was given, which the validator cannot see.
With the previous patch in place, all five of the chart tests fail; with this one, all
five pass.