profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/dcalhoun/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
David Calhoun dcalhoun @Automattic Nashville, TN https://davidcalhoun.me Christ follower. Father. Husband. Software engineer at @Automattic. FC Barcelona fan. Drummer. JavaScript enthusiast.

dcalhoun/alfred-remote-inspector-workflow 7

Remotely inspect any iOS device by name via Safari's web inspector.

dcalhoun/es6-migrate 5

CLI to convert AMD CoffeeScript to ES6 Standard JavaScript.

dcalhoun/github-to-clubhouse 1

Configure Clubhouse to respond to GitHub events by specific users.

dcalhoun/allis-and-david 0

Wedding site for my bride and me.

dcalhoun/amd-to-es6 0

convert amd to es6

dcalhoun/atom 0

The hackable text editor

dcalhoun/atom-erb 0

ERB support for Atom

dcalhoun/atom-smart-tab-name 0

Provide smarter tab names form Atom editor.

dcalhoun/atom-standardjs-snippets 0

:zap: A collection of JavaScript snippets for Atom, Standard Style

dcalhoun/atom-tab-foldername-index 0

Plugin for Atom editor. Plugin replaces tab's title if opened index.* file for more readability.

PullRequestReviewEvent

pull request commentWordPress/gutenberg

Add Media File and Attachment Page options to the native Image block Link To menu

The only thing I noticed that is directly related: I'm wondering if we should "hold" the custom URL when the user switches away from using Custom URL to another type and back. Currently doing so clears the previously-used URL, so you have to re-enter it, which I could see being frustrating.

Another way to solve this would be to list "recently used" URLs when the user taps into the Custom URL field, but I imagine that's not as straight forward of a thing to build.

@iamthomasbishop thank you for the review. I think some form of caching the most recently used custom URL(s) is likely a great feature. However, given this was a project I attempted (and failed) to finish within a week, I would suggest we postpone that improvement a follow-up iteration. I do not believe the URL caching feature would be insignificant. It is already likely that I will struggle to ship this soon, and adding the caching feature would likely delay shipping further. WDYT?

  • Some of the icon colors seem to be a bit off:

    • The 'checkmark' icon should use our primary blue (blue-50 in light mode, blue-30 in dark mode) (example). Note: this also applies to the checkmark icon on the custom URL sheet
    • The 'back' and 'X' icons seem a bit off, esp in dark mode. IIRC, we should be using light-secondary and dark-secondary from the base variables

I will investigate these color issues. If they are quick fixes, then I will include them in this work.

  • EDIT: Seems this might get resolved by this PR. I noticed our bottomSheet still suffers a weird transition when navigating from a child-sheet to its parent. For example, if you are on the Link to sub-sheet (where we list 'none', 'attachment page', etc) and you tap one of the options, the transition upward to its parent is a bit clunky, with the height of the sheet transitioning immediately and its contents transitioning as expected

Agreed. The navigation transitions are a bit broken currently. I do hope https://github.com/WordPress/gutenberg/pull/34425 resolves some of them, but it is to be seen if it resolves all of them. Also, I still have work to do before I can merge https://github.com/WordPress/gutenberg/pull/34425. Regardless, I think we should address them outside of this PR.

  • If you swipe-to-dismiss the full-height custom URL bottomSheet and then open block settings again, the sheet displays at full-height instead of its standard max-50% height

Yes, I have noticed this issue as well. I captured it in https://github.com/WordPress/gutenberg/issues/28173. I think we should address it outside of this PR.

dcalhoun

comment created time in an hour

pull request commentWordPress/gutenberg

Add Media File and Attachment Page options to the native Image block Link To menu

@iamthomasbishop I have created installable builds for WPiOS and WPAndroid. Would you be willing to review this for design and flow? Thanks! 🙇🏻

dcalhoun

comment created time in 4 days

PR opened wordpress-mobile/WordPress-Android

Add Media File and Attachment Page options to the native Image block Link To menu [Status] Not Ready for Merge

Note: This is a temporary PR to create installable builds for https://github.com/WordPress/gutenberg/pull/34846.

To test:

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • [ ] I have completed the Regression Notes.
  • [ ] I have considered adding accessibility improvements for my changes.
  • [ ] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
+1 -1

0 comment

1 changed file

pr created time in 4 days

PR opened wordpress-mobile/WordPress-iOS

Add Media File and Attachment Page options to the native Image block Link To menu [Status] DO NOT MERGE

Note: This is a temporary PR to create installable builds for https://github.com/WordPress/gutenberg/pull/34846.

To test:

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • [ ] I have completed the Regression Notes.
  • [ ] I have considered adding unit tests for my changes.
  • [ ] I have considered adding accessibility improvements for my changes.
  • [ ] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
+90 -90

0 comment

2 changed files

pr created time in 4 days

create barnchwordpress-mobile/WordPress-iOS

branch : feature/link-image-to-media

created branch time in 4 days

push eventwordpress-mobile/gutenberg-mobile

David Calhoun

commit sha 742ba818698220c640a73a30289f0fcfc14b2da9

Generate bundle

view details

push time in 4 days

PR opened wordpress-mobile/gutenberg-mobile

Add Media File and Attachment Page options to the native Image block Link To menu [Type] Enhancement

Related PRs

  • https://github.com/WordPress/gutenberg/pull/34846

Description

Add Media File and Attachment Page options to the native Image block Link To menu to allow quickly setting commonly used URLs. This feature already exists in the web interface.

To test: See https://github.com/WordPress/gutenberg/pull/34846

PR submission checklist:

  • [ ] I have considered adding unit tests where possible.
  • [ ] I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.
+1 -1

0 comment

1 changed file

pr created time in 4 days

create barnchwordpress-mobile/gutenberg-mobile

branch : feature/link-image-to-media

created branch time in 4 days

push eventWordPress/gutenberg

David Calhoun

commit sha c766a9072352875dca587a05bdbc8dd988277cc1

Fix alignment for left-aligned selected icon Toggling the icon opacity rather than the presence of the icon itself produces the desired alignment for both selected an unselected options.

view details

David Calhoun

commit sha cea3cfb247a95e6fc76023f45637449e0a2d42e8

Rename style selector to better describe intent

view details

David Calhoun

commit sha 41ebf8963b16e6a02b752a5b4f9820ca82615ec0

Remove irrelevant comment regarding setAttributes After reviewing the logic within `LinkSettings`, it largely manages invoking `setAttributes` in different scenarios. Therefore, using `setAttributes` directly makes sense for this component.

view details

David Calhoun

commit sha 79eb02cb81e72410afada4e91b915ae409ab6a82

Rename ImageOptionsScreen to ImageLinkDestinationsScreen Attempt to better describe component intent.

view details

David Calhoun

commit sha d67db6b03d3f7ae3472f8c2df7a6a6f5bfc72292

Add LinkDestination abstraction Avoid repetition to reduce likelihood of bugs.

view details

push time in 4 days

push eventWordPress/gutenberg

David Calhoun

commit sha 37374ee3e40502662a528e3d0b21bcbce05aef8b

Conditionally display Attachment Page option if URL exists External images will not have an attachment page URL, so this option should not be displayed when the URL is undefined.

view details

push time in 4 days

push eventWordPress/gutenberg

David Calhoun

commit sha eb3befed2f01380f9268815d4d4d7f7c53f59cd7

Fix incorrect link destination set when toggling new tab or setting rel When "Open in new tab" or "Link Rel" is modified, the URL is again passed to be set within `setMappedAttributes`. This caused the `linkDestination` to improperly be modified. This change now avoid settings `linkDestination` if the URL is not changing.

view details

push time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha 0c96e4440157f89465f3d598d11dae385b454f16

Fix attachment page URL

view details

push time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha d9296cd82f752dc3e88b17d06386257482a79694

Fix unnecessary updates to attributes that resulted in bug Set more appropriate defaults for link settings, the new values match the sibling state values of the components. Previously the `undefined` values for `label` and `rel` differed from the empty string values in component state. This change helps avoid unnecessary calls to `setAttributes` that occurred when the BottomSheet was closed. In addition to being unnecessary, these additional `setAttributes` calls caused the Image edit component to erroneously change the `linkDestination` even though the URL had not changed.

view details

push time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha 9a806c355d9fe9c9dc346bdb1707cc8914a38f61

Fix stale URL value Referencing `inputValue` from within LinkSettingsScreen resulted in a stale value to from `useRoute`. By referencing, the `url` where the callback is defined, we avoid this issue.

view details

David Calhoun

commit sha b693fc82d5e3ac5155ddf0cac015b2c9b5dd2489

Consistently reference mappedAttributes Avoid unnecessary complex code with varying approaches to referencing props.

view details

push time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha 2db29e536ee23d09036bbcc0555cb9ed9269c12e

Fix incorrect prop references The prior references are non-existent.

view details

David Calhoun

commit sha a75d41ecbd097423cafb60edb81af5ea1c764823

Correctly mask Custom URL value when a URL is set via a different option Selecting Media File or Attachment Page sets a URL value. Originally, this caused the Custom URL option to display the URL value, rather than persistently displaying its "Search or type URL" placeholder. The Custom URL option should only display an actual URL value if it is manually typed or selected within the link picker.

view details

David Calhoun

commit sha 648780ecb6ef454c826bb558f76b7f647cf489d0

Avoid passing current URL to link picker if it is not custom When the Media File or Attachment Page options are selected, a URL value is set. Previously, this value was passed to the link picker when the Custom URL option was subsequently selected. This meant the link picker would be pre-populated with a (likely unidentifiable) URL that was not manually entered by the user, which could be confusing.

view details

push time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha 3dde454427b01556243ad19e8ecbd9eca9f2a541

Reference Cell attached to BottomSheet component Avoid superfluous import.

view details

David Calhoun

commit sha 6882301034b928f61b69520b5671f5ebf29ee938

Fix incorrect prop references The prior references are non-existent.

view details

David Calhoun

commit sha 94e5afdc61bf9630640f9c5196c7a63bd2eab787

Correctly mask Custom URL value when a URL is set via a different option Selecting Media File or Attachment Page sets a URL value. Originally, this caused the Custom URL option to display the URL value, rather than persistently displaying its "Search or type URL" placeholder. The Custom URL option should only display an actual URL value if it is manually typed or selected within the link picker.

view details

push time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha 5cb29af474fd01a94e7aa6565ee8ffa081660803

Display correct value mask when URL value is set Relying upon the `placeholder` did not work correctly whenever a `value` was set, i.e. in the case of a Custom URL. Additionally, overloading the `placeholder` prop is confusing. The new `valueMask` prop hopefully better communicates the intent.

view details

push time in 5 days

pull request commentWordPress/gutenberg

Add Media File and Attachment Page options to the native Image block Link To menu

@mkevins this is very much still a work-in-progress and not completely functional, but I wanted to share it in case you'd like to provide a high-level review on the overall approach. A review now is not urgent if you do not have time, I will definitely seek your full review before merging this work. Thanks!

dcalhoun

comment created time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha caa5aeb8aa706ebe0cfeb6ce34e00d06c070eedf

Indicate selected link to option with check mark icon

view details

David Calhoun

commit sha 717cf6c4910195303f53d3de5ccff605333d3328

Fix comment typo

view details

push time in 5 days

PR opened WordPress/gutenberg

Add Media File and Attachment Page options to the native Image block Link To menu Mobile App - i.e. Android or iOS [Block] Image [Type] Feature

Description

[WIP] Fixes https://github.com/wordpress-mobile/gutenberg-mobile/issues/924. Add Media File and Attachment Page options to the native Image block Link To menu to allow quickly setting commonly used URLs. This feature already exists in the web interface.

How has this been tested?

TBD

Screenshots <!-- if applicable -->

TBD

Types of changes

New feature

Checklist:

  • [ ] My code is tested.
  • [ ] My code follows the WordPress code style. <!-- Check code: npm run lint, Guidelines: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/ -->
  • [ ] My code follows the accessibility standards. <!-- Guidelines: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/ -->
  • [ ] I've tested my changes with keyboard and screen readers. <!-- Instructions: https://github.com/WordPress/gutenberg/blob/HEAD/docs/contributors/accessibility-testing.md -->
  • [ ] My code has proper inline documentation. <!-- Guidelines: https://developer.wordpress.org/coding-standards/inline-documentation-standards/javascript/ -->
  • [ ] I've included developer documentation if appropriate. <!-- Handbook: https://developer.wordpress.org/block-editor/ -->
  • [ ] I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal). <!-- React Native mobile Gutenberg guidelines: https://github.com/WordPress/gutenberg/blob/HEAD/docs/contributors/code/native-mobile.md -->
+220 -27

0 comment

8 changed files

pr created time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha 5d681f7dacbfb7d2ce93bee1c1bd4d325f13a81f

Add initial UI for Image Link To options Displays "Media" and "Attachment Page" options within the Link To settings for the Image block. The logic does not work for the new options, and the implementation is rudimentary. Several `TODO(David)` are in place for remaining work.

view details

David Calhoun

commit sha 2232a485f32e7391db897a157acb3417cf164e57

Intercept link settings navigation with callback instead of string Using a callback avoids placing context-specific props reference inside of link settings. I.e. `imageUrl` and `attachmentPageUrl` are no longer referenced within link settings.

view details

David Calhoun

commit sha 5dbc530713dad5c978ec157c4ddc1cf411d54a8d

Align labels with web UI Reusing label text from the web will likely increase familiarity and reduce confusion for users.

view details

David Calhoun

commit sha 216e4b554f7efa794a0fc3c4439f60b67170efbd

Display selected link to option in Image block settings Display the currently selected link to option in the top-level Image block settings.

view details

David Calhoun

commit sha 3fc0c3cd704d2bfd85f700f8adf10d5edc1ecbd5

Reset link destination to None when removing Custom URL

view details

David Calhoun

commit sha e3a1710be27ca8db11d8d723594b7beef34b3f72

Indicate selected link to option with check mark icon

view details

push time in 5 days

PullRequestReviewEvent

issue closedwordpress-mobile/gutenberg-mobile

Editing unsupported blocks is not disallowed on Classic-enabled Atomic sites

Describe the bug Following the TC004 test case steps with an account registered after December 2018, presents the "Edit using web editor" button, even though the Classic editor is enabled and set as the default. Tapping the button loads an empty web view. The expectation is that there should not be an option to edit the block in a web browser.

To Reproduce Precondition: A WP.com Atomic site (i.e. a WP.com site with a Business plan) with the Classic editor set as the default. Here are the steps for creating this if necessary:

  1. Find a site with a Business plan or higher
  2. Install and activate the Classic Editor plugin
  3. In Calypso choose your site and go to Tools | Plugins | Installed Plugins, then tap Settings under the Classic Editor plugin and set Default editor for all users to Classic Editor

Reproducing:

  1. On the site described above, add a post, then add a block that's not yet supported on mobile (e.g. Jetpack Markdown at time of writing)
  2. Log into the WordPress mobile app using the site's WP.com account
  3. Open the post and expect to see the block rendered as a placeholder with the text "Unsupported"
  4. Tap the (?) icon and expect to NOT see an option to edit the block in a web browser

Expected behavior There should not be an option to edit the block in a web browser.

Screenshots

https://user-images.githubusercontent.com/438664/119186357-9de90e80-ba3d-11eb-8b98-9582e4b93d0e.MP4

Smartphone (please complete the following information):

  • Device: iPhone SE
  • OS: iOS 14.4.2
  • Version: 17.4

Additional context Likely related to #3425.

closed time in 5 days

dcalhoun

issue commentwordpress-mobile/gutenberg-mobile

Editing unsupported blocks is not disallowed on Classic-enabled Atomic sites

Given this, do you agree that we can close this, @dcalhoun? I can take care of updating the test cases to reflect this.

@Guarani I agree we should close this, as the spirit of this issue was accomplished. Thank you for following up on this. 🙇🏻

dcalhoun

comment created time in 5 days

push eventWordPress/gutenberg

David Calhoun

commit sha 1d6752a941049c2b0ebb44684609a2eb67255bf0

Add initial UI for Image Link To options Displays "Media" and "Attachment Page" options within the Link To settings for the Image block. The logic does not work for the new options, and the implementation is rudimentary. Several `TODO(David)` are in place for remaining work.

view details

push time in 6 days

create barnchWordPress/gutenberg

branch : feature/link-image-to-media

created branch time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent