[wp-trac] [WordPress Trac] #62374: Interactivity API: Missing state properties and negation operator behave differently client/server

WordPress Trac noreply at wordpress.org
Wed Nov 13 11:18:03 UTC 2024


#62374: Interactivity API: Missing state properties and negation operator behave
differently client/server
---------------------------------------------+-------------------------
 Reporter:  jonsurrell                       |       Owner:  jonsurrell
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.7.1
Component:  Interactivity API                |     Version:  6.5
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch commit has-unit-tests  |     Focuses:
---------------------------------------------+-------------------------
Changes (by cbravobernal):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59398" 59398]:
 {{{
 #!CommitTicketReference repository="" revision="59398"
 Interactivity API: Allow missing state negation on server

 Aligns on the behavior of the negation operator with directives to missing
 paths in client and in server.

 With a directive like the following:
 {{{
 <div data-wp-bind--hidden="!state.missing.property">
         This should be hidden by the <code>hidden</code> attribute.
 </div>
 }}}

 Both server and client will return with this fix:
 {{{
 <div data-wp-bind--hidden="!state.missing.property" hidden="">
         This should be hidden by the <code>hidden</code> attribute.
 </div>
 }}}

 Props jonsurrell, luisherranz.
 Fixes #62374.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62374#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list