Avoid suggesting UNIX timestamp integers for `type: integer` props
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3533675. -->
Reported by: [wim leers](https://www.drupal.org/user/99777)
Related to !428 !426 !425
>>>
<h3 id="overview">Overview</h3>
<p>Over a year ago, XB added <code>StringSemanticsConstraint</code>. Because URLs, titles, names of people, filenames and so on all are strings, but they're NOT all the same <em>kind</em> of string.</p>
<p>This is coming up again for integers over at <a href="https://git.drupalcode.org/project/experience_builder/-/merge_requests/1138/diffs#note_545070">https://git.drupalcode.org/project/experience_builder/-/merge_requests/1138/diffs#note_545070</a>, for video width/height:</p>
<blockquote><p>
🐛 This <code>width↝entity␜␜entity:file␝filesize␞␟value</code> is <em>nonsense</em> ("filesize" is assigned as width). Same for <code>height↝entity␜␜entity:file␝created␞␟value</code> ("created" UNIX timestamp is assigned as height).
</p></blockquote>
<p>This results in the following incoherent set of suggestions when populating a <code>type: integer</code> prop in a <code>ContentTemplate</code>:</p>
<pre>"Authored by → User → Last access" => 'ℹ︎␜entity:node:foo␝uid␞␟entity␜␜entity:user␝access␞␟value',<br> "Authored by → User → Changed" => 'ℹ︎␜entity:node:foo␝uid␞␟entity␜␜entity:user␝changed␞␟value',<br> "Authored by → User → Created" => 'ℹ︎␜entity:node:foo␝uid␞␟entity␜␜entity:user␝created␞␟value',<br> "Authored by → User → Last login" => 'ℹ︎␜entity:node:foo␝uid␞␟entity␜␜entity:user␝login␞␟value',<br> 'Authored by → User → Picture → Height' => 'ℹ︎␜entity:node:foo␝uid␞␟entity␜␜entity:user␝user_picture␞␟height',<br> 'Authored by → User → Picture → Width' => 'ℹ︎␜entity:node:foo␝uid␞␟entity␜␜entity:user␝user_picture␞␟width',<br> "Authored on" => 'ℹ︎␜entity:node:foo␝created␞␟value',<br> "Changed" => 'ℹ︎␜entity:node:foo␝changed␞␟value',<br> "Silly image 🤡 → Changed" => 'ℹ︎␜entity:node:foo␝field_silly_image␞␟entity␜␜entity:file␝changed␞␟value',<br> "Silly image 🤡 → Created" => 'ℹ︎␜entity:node:foo␝field_silly_image␞␟entity␜␜entity:file␝created␞␟value',<br> "Silly image 🤡 → File size" => 'ℹ︎␜entity:node:foo␝field_silly_image␞␟entity␜␜entity:file␝filesize␞␟value',<br> "Silly image 🤡 → Height" => 'ℹ︎␜entity:node:foo␝field_silly_image␞␟height',<br> "Silly image 🤡 → Width" => 'ℹ︎␜entity:node:foo␝field_silly_image␞␟width',<br> "Revision create time" => 'ℹ︎␜entity:node:foo␝revision_timestamp␞␟value',<br> "Revision user → User → Last access" => 'ℹ︎␜entity:node:foo␝revision_uid␞␟entity␜␜entity:user␝access␞␟value',<br> "Revision user → User → Changed" => 'ℹ︎␜entity:node:foo␝revision_uid␞␟entity␜␜entity:user␝changed␞␟value',<br> "Revision user → User → Created" => 'ℹ︎␜entity:node:foo␝revision_uid␞␟entity␜␜entity:user␝created␞␟value',<br> "Revision user → User → Last login" => 'ℹ︎␜entity:node:foo␝revision_uid␞␟entity␜␜entity:user␝login␞␟value',<br> 'Revision user → User → Picture → Height' => 'ℹ︎␜entity:node:foo␝revision_uid␞␟entity␜␜entity:user␝user_picture␞␟height',<br> 'Revision user → User → Picture → Width' => 'ℹ︎␜entity:node:foo␝revision_uid␞␟entity␜␜entity:user␝user_picture␞␟width',</pre><h3 id="proposed-resolution">Proposed resolution</h3>
<p>See the "goal" MR: <a href="https://git.drupalcode.org/project/canvas/-/merge_requests/425/diffs —">https://git.drupalcode.org/project/canvas/-/merge_requests/425/diffs —</a> this shows ONLY what the goal is.</p>
<ol>
<li>Approach 1: "semantics constraint" MR: <a href="https://git.drupalcode.org/project/canvas/-/merge_requests/426">https://git.drupalcode.org/project/canvas/-/merge_requests/426</a> — based on the original issue summary and the research comments 6 through 8, concerns listed in comment 13
</li><li>Approach 2: "reuse the existing "Range" constraint on timestamp fields": <a href="https://git.drupalcode.org/project/canvas/-/merge_requests/428/diffs">https://git.drupalcode.org/project/canvas/-/merge_requests/428/diffs</a>, reuses the infra additions from approach 1, without the new constraint
</li></ol>
<h3 id="ui-changes">User interface changes</h3>
<p>None — except that if <code>DynamicPropSource</code> suggestions are visible, they will now make a lot more sense:</p>
<dl>
<dt>before</dt>
<dd><img src="https://www.drupal.org/files/issues/2025-12-17/before.png">
</dd><dt>after</dt>
<dd><img src="https://www.drupal.org/files/issues/2025-12-17/after.png"><br>
👆 if you drill down, you'll find these allow you to pick "image width/height", including on the user picture<br>
</dd></dl>
<p>(tested using the "integer" prop on the "all-props" test SDC, when editing a <code>ContentTemplate</code>)</p>
> Related issue: [Issue #2226493](https://www.drupal.org/node/2226493)
> Related issue: [Issue #3521088](https://www.drupal.org/node/3521088)
issue