Add create new translation button to editor metabox#607
Draft
apermo wants to merge 6 commits intolloc:masterfrom
Draft
Add create new translation button to editor metabox#607apermo wants to merge 6 commits intolloc:masterfrom
apermo wants to merge 6 commits intolloc:masterfrom
Conversation
Update render_select and render_input tests to expect the new "create new translation" link and the required additional WordPress function mocks.
Add a "+" button to the editor metabox that opens post-new.php with msls_id and msls_lang params in a new tab. Visible when no post is linked and the current post has been saved. Closes lloc#606
Hide the create new button when a post is selected via autocomplete and show it again when the field is cleared.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a 'create new translation' link within the MslsMetaBox for both select and input rendering modes. The implementation includes logic to verify post status, a new private helper method for link generation, and JavaScript to toggle link visibility based on user selection. Review feedback identifies that the for attributes in the generated HTML labels are improperly used to store CSS classes, which violates HTML standards and hinders accessibility; these classes should be moved to a class attribute.
Remove underline and add proper color to the create new translation button in the metabox.
The label for attribute was polluted with CSS classes which is invalid HTML. Move msls-icon-wrapper and icon type to a proper class attribute.
The WordPress plugin checker requires the translators comment on the line directly above the __() call.
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.
Summary
post-new.php?msls_id=NNN&msls_lang=XXin a new tab, matching the listing column behaviormsls_idandmsls_langto the existing icon link URLs in the metaboxCloses #606
Test plan
msls_idandmsls_langparams