Conversation
|
Our travis build for 5.2/5.3 kept failing repeatedly, so thinking it was something that may have been fixed in master, I rebased and then made this repeat of the pr. |
modules/contact-form.php
Outdated
|
|
||
| include dirname( __FILE__ ) . '/contact-form/grunion-contact-form.php'; | ||
|
|
||
| if ( is_admin() ) { |
There was a problem hiding this comment.
What about a filter here to disable the new feature. I would specifically note in the inline docs (and maybe in the filter name) that it is a temporary filter. Maybe say we'll keep it in for the next three? six? months or unless there is a security issue in the older code that we opt to remove it before that time, etc etc etc.
There was a problem hiding this comment.
Care to add a commit to introduce it? Maybe change the line to
if ( is_admin() && apply_filters( 'tmp_grunion_allow_editor_view', true ) ) {For a gentle way to use the older UI to give site owners time to update tutorials, instruct clients, etc. Noting a timeline to remove in six months.
|
5.2/5.3 is likely due to #7453 . I'm going to merge that one and see if that resolves it. (Merging out of process only since it is a unit test issue, not production code). |
|
Indeed that is the cause, the 5.2 job is currently running on Trusty, Trusty doesn't have PHP 5.2 or 5.3 available, updating |
|
Cherry picked them over. |
|
Updated D6457 to reflect new filter and filter docs. Thanks @kraftbj! |
|
As we are moving the contact form button into the TinyMCE bar, should we do some sort of tooltip callout pointing out the change to folks? Or maybe just keep the old button as well? It is possible to gloss over. If this merges, I'll do a second PR to add it back in if we want to keep it. |
|
I'm doing some last minute RTL testing before we merge this. It's totally functional, but some stuff isn't being mirrored. |
This will handle swapping the sub-iframe to match rtl when needed.
|
As of this point, the phab diff is still in sync with the PR. |
|
Taking it for a spin. |
* Changed edit mode card focus and hover styles * Changed edit mode background color to grey to better indicate it needs to be saved/exited * Fixed Required toggle positioning via flex * Fixed label spacing * Fixed primary button styling in edit mode * Removed a bit of unused styles
|
Pushed several style changes. Still planning on trying:
|
|
With the changes in 3cfd8ff implementing |
|
The phabricator diff -- D6457 -- is now up to date with ~. |
zinigor
left a comment
There was a problem hiding this comment.
Code-wise everything seems to be OK except for several i18n nitpicks. Plus, the JS could use a style pass - there are spaces missing here and there.
I'm going to do a testing run next.
| 'checkbox' => __( 'Checkbox', 'jetpack' ), | ||
| 'checkbox-multiple' => __( 'Checkbox with Multiple Items', 'jetpack' ), | ||
| 'select' => __( 'Drop down', 'jetpack' ), | ||
| 'radio' => __( 'Radio', 'jetpack' ), |
There was a problem hiding this comment.
Every one of these translatable strings could really use context. Some of them need it badly, like Drop down can be translated at least three different ways without knowing what it means. If we already have strings like these, I would propose just adding translator comments to avoid creating new strings:
/* translators: label name to choose a dropdown field for a contact form */
'select' => __( 'Drop down', 'jetpack' ),
Also, shouldn't it be Dropdown?
There was a problem hiding this comment.
This was just pulling across via
jetpack/modules/contact-form/grunion-form-view.php
Lines 185 to 193 in 764a699
|
|
||
| <label class="grunion-required"> | ||
| <input type="checkbox" name="required" value="1" <# if ( data.required ) print( 'checked="checked"' ) #> /> | ||
| <span><?php esc_html_e( 'Required?', 'jetpack' ); ?></span> |
There was a problem hiding this comment.
Same here, context needed.
|
Just following up to ^^, heard from @zinigor in Slack to just leave the translator notes be as it's just pulling existing strings across. |
heard from @zinigor in Slack to just leave the translator notes be as it's just pulling existing strings across.
| named, | ||
| fields = '', | ||
| stylesheet_url = ( 1 === window.isRtl ) | ||
| ? grunionEditorView.inline_editing_style_rtl |
There was a problem hiding this comment.
modules/contact-form/js/editor-view.js
line 71 col 21 Bad line breaking before '?'.
Build tools are erroring on this saying it's bad on jshint.
|
Works great! Merging. |
Closes #6685
Fixes #7063
Fixes #1849
Fixes #1055
Fixes #642
Fixes #604
Fixes #254
This is a redo of #6685 because I seem to have made that ugly by rebasing it. :\
The diff to implement this on wpcom is at D6457
This is currently just adding the overrides -- I'm intentionally not removing the old legacy code yet, to ease the transition on any users that prefer the old method. They can just disable the new include line, and the old way will be back again.
Props @MichaelArestad @azaozz and @georgestephanis for building this at the 2016 a8c GM.
Changes proposed in this Pull Request:
Testing instructions: