#58918 closed enhancement (fixed)
HTML API: Adjust code stying to Gutenberg's linter's preferences
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | HTML API | Keywords: | has-patch commit |
Focuses: | coding-standards | Cc: |
Description
In this patch we're adjusting the code style according to the rules that the linting process in Gutenberg requires. There should be no code changed by this patch.
Change History (14)
This ticket was mentioned in PR #4918 on WordPress/wordpress-develop by @dmsnell.
20 months ago
#1
#2
@
20 months ago
Shouldn't we rather align the two coding standards? 🤔
Code in WP should follow the WP coding standards, not some external ones, no? I'd recommend checking with #core-coding-standards on this.
#3
@
20 months ago
I would love that and have been asking for it @swissspidy. I'm not able to tackle that challenge though, so I'm more focused on making sure that code isn't arbitrarily blocked in WordPress by rules in a separate repo.
Of note, Gutenberg is WordPress and its coding standards are WordPress coding standards.
None of the changes in this patch conflict with the CI builds for Core: they satisfy both repos (except for one remaining case in Gutenberg where I believe that the CI job has mis-analyzed something).
#4
@
20 months ago
its coding standards are WordPress coding standards.
Obviously not, otherwise you wouldn't have to make this change :-)
Can you perhaps elaborate on why this code needs to satisfy the different CS requirements from the Gutenberg repo? As far as I can tell this code only lives in the WordPress repo.
#5
@
20 months ago
Obviously not, otherwise you wouldn't have to make this change :-)
ha! tell that to the people implementing WPCS 😄
Can you perhaps elaborate on why this code needs to satisfy the different CS requirements from the Gutenberg repo? As far as I can tell this code only lives in the WordPress repo.
This is part of a standard "backporting" process to bring updates in Core to Gutenberg. Because of recurring conflicts arising between people who work on different sides of the codebase (Gutenberg and WordPress SVN) I have been building code in Core first, bringing them over to Gutenberg.
This code does live in Gutenberg and must live in Gutenberg until Gutenberg no longer supports versions of Core that don't have the required library. Even then, as long as updates are applied in Core they need to be backported into Gutenberg to avoid crashing or corrupting sites with the plugin activated.
This should be a trivial patch; is there anything in the contents of the patch you object to? I don't believe it's going to be a productive place to address longstanding systematic issues between Gutenberg and Core 😄
For what it's worth, I do believe that it's the goal of people working on the WordPress Coding Standards to harmonize the repos. Unfortunately we're left stranded until that happens because they've decided to reject patches with issues; so we go through the ritual of updating style so we aren't blocked 🤷♂️ This is the same process for updating any Core code that Gutenberg relies on.
#6
@
20 months ago
This code does live in Gutenberg
Where? It is not clear to me and I could not find these classes in the Gutenberg repo right a way.
I don't have any objections to the contents of the patch, but there really was not enough context on the ticket initially, hence the many questions.
#7
@
20 months ago
Where
I'm bringing the code over in #52908 which is currently blocked because of the linting issues (even though it's merged code and supposed to be a "blessed" PR).
I don't want to split the codebases which is why I'm trying to address this here first, so there's never two divergent versions of the code.
there really was not enough context on the ticket initially, hence the many questions.
Sorry. I was terse because I'm used to making these updates and there's not much to say about them, but I can include more context in the future.
Thanks for taking a look at it!
#9
@
20 months ago
Is there any opposition to this? If not, can someone merge it so we can push the backport into Gutenberg?
#12
@
20 months ago
- Owner set to Bernhard Reiter
- Resolution set to fixed
- Status changed from new to closed
In 56363:
@Bernhard Reiter commented on PR #4918:
20 months ago
#13
Thanks all! Committed to Core in https://core.trac.wordpress.org/changeset/56363/.
Trac: #58918-ticket
In this patch we're adjusting the code style according to the rules that the linting process in Gutenberg requires. There should be no code changed by this patch.