profile
viewpoint
Matthew Riley MacPherson tofumatt @octopusthink Scotland / Portugal https://tofumatt.com Chief Technical Octopus @octopusthink. I make @localForage and other nice things.

localForage/localForage 19771

💾 Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.

google/site-kit-wp 1070

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.

jbalogh/django-multidb-router 295

Round-robin master/slave db router for Django.

fwenzel/serpent 15

An Open Web app version of the classic game "snake".

Osmose/flux-game 10

Flux Game!

sarahmonster/suitor 7

Open-source Rails app for tracking job applications.

fwenzel/hipstergram 4

A highly distinguished image manipulation webapp

octopusthink/captain-hooks 1

A collection of useful React hooks used in @octopusthink projects.

octopusthink/ghost-ship 1

A Gatsby starter template for websites & blogs. Designed for accessibility and SEO-friendliness.

push eventgoogle/site-kit-wp

Asvin Balloo

commit sha 88182c5f9c29948bacf784b1cd31e65d9d1a5c54

Save work in progress.

view details

Asvin Balloo

commit sha bcb4ee9115b4c1bc6a50961a6671c25489435ae5

Add checks whether AdSense is connected.

view details

Asvin Balloo

commit sha ce875d77b770f7dafe2c6d92d6c089adc7977dc3

Merge branch 'develop' into enhancement/4145-adsense-cta-widget.

view details

Asvin Balloo

commit sha 8783b5d92ced36fe5dade6add41ac1baea340df8

Merge branch 'develop' into enhancement/4145-adsense-cta-widget.

view details

Asvin Balloo

commit sha 42d71f9bf71ea5d45188dee980a9e09afbaef116

Add stories for AdSenseConnectCTA.

view details

Asvin Balloo

commit sha fbc50f2c73e8c65aab95494983d52d1851ade4ac

Fix failing tests.

view details

Ivan@Kruchkoff.com

commit sha fe57d66f5e96cd28544f62bb1c62abbe0915ef03

Add EntityHeaderBanner.

view details

Asvin Balloo

commit sha be80e45ebb8febb42871670efea65fc6e4893952

Merge branch 'develop' into enhancement/4145-adsense-cta-widget.

view details

Asvin Balloo

commit sha 2a779f644c3c85a370dac5e895ccc3de3f58cc65

Add tracking info.

view details

Asvin Balloo

commit sha 88e14782ca4e1af3f662cb6273d277b3e69bef21

Merge branch 'develop' into enhancement/4145-adsense-cta-widget.

view details

Asvin Balloo

commit sha 365284843a0272a8127465a0ff526832603c879f

Add isDismissingItem selector.

view details

Ivan@Kruchkoff.com

commit sha 317c133a41a8ae99f8643aa892d91870acbf563b

Add fragment.

view details

Ivan@Kruchkoff.com

commit sha badc6fbf87faefb41a75e46feb53ab8b2f6a4a40

Merge branch 'develop' into feature/4146-entity-context-component.

view details

Ivan@Kruchkoff.com

commit sha 8345a3a303c84c03bc9282eeada29c9b3e1ba884

Merge branch 'develop' into feature/4146-entity-context-component.

view details

Ivan@Kruchkoff.com

commit sha 86877240d5634ad800ce04b6e06e83f9d81f2357

Update component.

view details

Ivan@Kruchkoff.com

commit sha 5e27e44990834c2015aea6afb8e3f31b2e94065f

Update conditional checks.

view details

Ivan@Kruchkoff.com

commit sha d7906bc4fbefe16464a80779b8e3345696149227

Show entity url.

view details

Ivan@Kruchkoff.com

commit sha 8378255aa0b95781df054391489c2ff4634322b7

Merge branch 'develop' into feature/4146-entity-context-component.

view details

Ivan@Kruchkoff.com

commit sha 506357caa0d3d81021d7f20d73eea16bda7c75a8

Interpolate strings and change view context.

view details

Asvin Balloo

commit sha 81a971fbf497eb7505a6124db9828dd9338d8c45

Fix styling for header.

view details

push time in 4 hours

push eventgoogle/site-kit-wp

Matthew Riley MacPherson (tofumatt)

commit sha 12229bd6e13824b0f39843c70a51a545f989d8d3

Revert "Attempt to fix some widget undefined select calls." This reverts commit 2ad51199116c54e41541c52c91f3eb5fd69eba1b.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 71946ee2bd283974701cce091e222446ebd71903

Revert "Update all useSelect calls." This reverts commit 86a68470d2f8a10ec2134d9cfe6009fe8e62e9e6.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 26a3c3b41d356142ac4fdc9fac034d9c902420c0

Revert "Update all useSelect calls." This reverts commit 86a68470d2f8a10ec2134d9cfe6009fe8e62e9e6.

view details

push time in 5 hours

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha 795404fc2a9d11796772cba1d0356979d2ff53f1

Deploying to gh-pages - 10:05:26

view details

push time in 9 hours

push eventgoogle/site-kit-wp

Matthew Riley MacPherson (tofumatt)

commit sha 2ad51199116c54e41541c52c91f3eb5fd69eba1b

Attempt to fix some widget undefined select calls.

view details

push time in a day

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha f56244e5e1bff9fc69a319e4a2b6e38353206cdf

Deploying to gh-pages - 10:03:33

view details

push time in a day

issue commentgoogle/site-kit-wp

Create separate Webpack configuration for Gutenberg-related entrypoints

Ah, thanks! Sorry I missed that; in terms of plugins to use, I think we want everything here except the ProvidePlugin:

https://github.com/google/site-kit-wp/blob/9683b8c3687350ba6134b1a484285ceb12a236e1/webpack.config.js#L239-L278

We don't want to provide React in the bundle ourselves; users should be using the React from WordPress Element there.

The WebpackBar option should be edited to show a new colour (dealer's choice as to what looks good there) and a name like "Editor Entry Points" or similar.

felixarntz

comment created time in 2 days

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha f3a729a5aa260f2bc56edf98348f75ef1f14d852

Deploying to gh-pages - 10:02:06

view details

push time in 2 days

issue commentgoogle/site-kit-wp

Create separate Webpack configuration for Gutenberg-related entrypoints

@kuasha420 Argh, that's totally correct. I think I overlooked it because I had discussed the approach we'd likely use before but I can see it's missing from the IB. My brain must've filled in the blanks, sorry!

The approach here should be that we should alias all @wordpress-core/* imports to use the relevant window.wp.* package. We'll want to alias @wordpress-core/api-fetch to wp.apiFetch, @wordpress-core/element to wp.element, etc. Fortunately we actually used to do this so there's prior art in the repo for the approach: https://github.com/google/site-kit-wp/blob/9a262cd18c33995ce5ec81bc300ff055dff2a153/webpack.config.js#L32-L85

assets/js/googlesitekit-idea-hub-notice.js should be updated to use the new @wordpress-core/* imports so it eventually resolves to the built-in wp.* objects.

It's not clear from the IB which plugins we want for the gutenberg entrypoints or do we want all of them.

I'm not sure what you mean here—do you mean which packages should we create aliases for? I think for now the list in the link I posted above is fine, but if any are missing feel free to add them. If it's trivial to add them all (or if it can be automated) then go for that I guess 😄

felixarntz

comment created time in 3 days

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha f4ef7457c0676303016c186cdb3b0f7a0ee14d2f

Deploying to gh-pages - 10:04:01

view details

push time in 3 days

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha 43a0bbda073440da510bf8fe25cf3e40fe9f7a4b

Deploying to gh-pages - 10:01:35

view details

push time in 5 days

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha 40c94be16b3f90784b5d3b99202a218aefc787f8

Deploying to gh-pages - 10:03:43

view details

push time in 6 days

push eventgoogle/site-kit-wp

Ivan@Kruchkoff.com

commit sha fe57d66f5e96cd28544f62bb1c62abbe0915ef03

Add EntityHeaderBanner.

view details

Ivan@Kruchkoff.com

commit sha 317c133a41a8ae99f8643aa892d91870acbf563b

Add fragment.

view details

Ivan@Kruchkoff.com

commit sha badc6fbf87faefb41a75e46feb53ab8b2f6a4a40

Merge branch 'develop' into feature/4146-entity-context-component.

view details

Ivan@Kruchkoff.com

commit sha 8345a3a303c84c03bc9282eeada29c9b3e1ba884

Merge branch 'develop' into feature/4146-entity-context-component.

view details

Ivan@Kruchkoff.com

commit sha 86877240d5634ad800ce04b6e06e83f9d81f2357

Update component.

view details

Ivan@Kruchkoff.com

commit sha 5e27e44990834c2015aea6afb8e3f31b2e94065f

Update conditional checks.

view details

Ivan@Kruchkoff.com

commit sha d7906bc4fbefe16464a80779b8e3345696149227

Show entity url.

view details

Ivan@Kruchkoff.com

commit sha 8378255aa0b95781df054391489c2ff4634322b7

Merge branch 'develop' into feature/4146-entity-context-component.

view details

Ivan@Kruchkoff.com

commit sha 506357caa0d3d81021d7f20d73eea16bda7c75a8

Interpolate strings and change view context.

view details

Asvin Balloo

commit sha 81a971fbf497eb7505a6124db9828dd9338d8c45

Fix styling for header.

view details

Ivan@Kruchkoff.com

commit sha 3e473ca1a95ebeacc561fa21911fe5c4acaa98a3

Add subHeader to match DashboardMainApp.

view details

Ivan@Kruchkoff.com

commit sha c1361f493b3673c08d1c99be118384d7f3a5bfdb

Update context.

view details

Matthew Riley MacPherson

commit sha b495a3ce2e6d14ab54ec3bd6015743247b24663a

Merge branch 'develop' into feature/4146-entity-context-component

view details

Matthew Riley MacPherson (tofumatt)

commit sha 289246defbcbee705a744ec850dc64cc8481c606

Add comment to clarify aria-label.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 4e71551125a0e759bda7e12d7c3225eba009d150

Remove quote inside aria-label.

view details

Matthew Riley MacPherson

commit sha 5dcbb1ecd2ae9d0e98cd7552ef38fcf9e22e5a36

Merge pull request #4384 from google/feature/4146-entity-context-component Feature/4146 entity context component

view details

push time in 7 days

delete branch google/site-kit-wp

delete branch : feature/4146-entity-context-component

delete time in 7 days

PR merged google/site-kit-wp

Feature/4146 entity context component cla: yes

Summary

<!-- Please reference the issue this PR addresses. --> Addresses issue #4146

Relevant technical choices

<!-- Please describe your changes. -->

Checklist

  • [x] My code is tested and passes existing unit tests.
  • [x] My code has an appropriate set of unit tests which all pass.
  • [x] My code is backward-compatible with WordPress 4.7 and PHP 5.6.
  • [x] My code follows the WordPress coding standards.
  • [x] My code has proper inline documentation.
  • [x] I have added a QA Brief on the issue linked above.
  • [x] I have signed the Contributor License Agreement (see https://cla.developers.google.com/).
+269 -14

2 comments

9 changed files

ivankruchkoff

pr closed time in 7 days

PullRequestReviewEvent

pull request commentgoogle/site-kit-wp

Feature/4146 entity context component

@googlebot I consent.

ivankruchkoff

comment created time in 7 days

push eventgoogle/site-kit-wp

Matthew Riley MacPherson (tofumatt)

commit sha 289246defbcbee705a744ec850dc64cc8481c606

Add comment to clarify aria-label.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 4e71551125a0e759bda7e12d7c3225eba009d150

Remove quote inside aria-label.

view details

push time in 7 days

Pull request review commentgoogle/site-kit-wp

Feature/4146 entity context component

+/**+ * EntityHeaderBanner component.+ *+ * Site Kit by Google, Copyright 2021 Google LLC+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ *     https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++/**+ * WordPress dependencies+ */+import { __, sprintf } from '@wordpress/i18n';+import {+	useContext,+	useCallback,+	createInterpolateElement,+} from '@wordpress/element';++/**+ * Internal dependencies+ */+import Data from 'googlesitekit-data';+import ViewContextContext from './Root/ViewContextContext';+import { VIEW_CONTEXT_PAGE_DASHBOARD } from '../googlesitekit/constants';+import Button from './Button';+import { CORE_SITE } from '../googlesitekit/datastore/site/constants';+import BackspaceIcon from '../../svg/keyboard-backspace.svg';+import { CORE_LOCATION } from '../googlesitekit/datastore/location/constants';+import Link from './Link';+const { useSelect, useDispatch } = Data;++const EntityHeaderBanner = () => {+	const viewContext = useContext( ViewContextContext );+	const currentEntityTitle = useSelect( ( select ) =>+		select( CORE_SITE ).getCurrentEntityTitle()+	);+	const entityURL = useSelect( ( select ) =>+		select( CORE_SITE ).getCurrentEntityURL()+	);++	const { navigateTo } = useDispatch( CORE_LOCATION );+	const returnURL = useSelect( ( select ) =>+		select( CORE_SITE ).getAdminURL( 'googlesitekit-dashboard' )+	);++	const onClick = useCallback( () => {+		navigateTo( returnURL );+	}, [ returnURL, navigateTo ] );++	if (+		VIEW_CONTEXT_PAGE_DASHBOARD !== viewContext ||+		entityURL === null ||+		currentEntityTitle === null+	) {+		return null;+	}++	return (+		<div className="googlesitekit-entity-header-banner">+			<Button+				icon={ <BackspaceIcon width={ 24 } height={ 24 } /> }+				aria-label={ __( 'Return to dashboard"', 'google-site-kit' ) }+				onClick={ onClick }+				className="googlesitekit-entity-header-banner__back"+				text+			>+				{ __( 'Return to dashboard', 'google-site-kit' ) }

Why the duplicated aria-label here? A screenreader would read out the button text by default, so I don't think the aria-label is needed.

~If this is here for when the button is off-screen, that isn't needed as long as we visually hide the button instead of display: none-ing it. In fact, if we set this button to display: none then a screenreader won't read it, so we need to render the button off-screen rather than using display: none.~

EDIT: Looks like this is here for when the text/"label" is set to display: none. I guess it's a bit odd but it works for this implementation. Let's add a comment for future devs 😅

				// This is duplicated because on small screens, the text supplied below is visually
				// hidden even though the button remains on-screen (and thus accessible to
				// screen-readers).
				aria-label={ __( 'Return to dashboard"', 'google-site-kit' ) }
				onClick={ onClick }
				className="googlesitekit-entity-header-banner__back"
				text
			>
				{ __( 'Return to dashboard', 'google-site-kit' ) }
ivankruchkoff

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventgoogle/site-kit-wp

Arafat Zahan

commit sha 912f152274f79c8267db860d8750a9342b38858a

Remove chips that have no coresponding widgets.

view details

Asvin Balloo

commit sha 5395c06b8bfb1473a35cf9a811a94b75b7225825

Add ActivateAnalyticsNotice component.

view details

Asvin Balloo

commit sha e5a8d3fffa969078050d62e74b68a9ad081ca3c6

Fix stories.

view details

Arafat Zahan

commit sha 7acce50994482d8e971958d6bf611b1270ccc2b3

Break up useSelect calls.

view details

Eugene Manuilov

commit sha fa55e0b2cff0f498b0ceebd3186e46860b502078

Update the idea hub survey threshold.

view details

Eugene Manuilov

commit sha 17c3ef527ad3844c06a5f0b5980ea64514996330

Revert removed tabToIndex object.

view details

Ivan@Kruchkoff.com

commit sha 10f1b99f7f3dc5e2eda1e84cde53a14c7d9cc6ce

Add error message.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 26fba487833d406c086a224e22c099d79b52012a

Add a whitespace line for readability.

view details

Matthew Riley MacPherson

commit sha ef4e697d5d61252afd1bfe30b2fb4b4c26f58b08

Merge pull request #4392 from google/feature/4287-invalid-entity-dashboard-urls Add error message.

view details

Arafat Zahan

commit sha ebcb076159e8bd73ae11364c8ea82dac87178cb4

Update stories.

view details

Arafat Zahan

commit sha 86fe0bd21c2cb3d534ad331bd133a9d6324881ae

Update website url to the specific one.

view details

Arafat Zahan

commit sha d185299e7c1289328cf1cacc96239d5205704b29

Add period to the full sensentences.

view details

Asvin Balloo

commit sha a2266d7a9f8b898ddf664a9a412e79d6a9ea292f

Fix stories.

view details

Asvin Balloo

commit sha 229609168c2993e391bf1b4995205834d6df5722

Update SVGs to include viewBox.

view details

Asvin Balloo

commit sha b125b2bd52c3e88b4c9b929e5f0fb06f4e1ac94c

Merge branch 'develop' into feature/4341-analytics-splash-ui.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 73e8caee1b35899327bee34fe2d1c40d7cf156c7

Fix AdSense widget registration.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 53a768c6a3bc353966f95371e6c03c816a61ec79

Render AdBlocker check unconditionally.

view details

Asvin Balloo

commit sha f40ff3ac06586b8b9005d23d14b8a691d35c0fcf

Remove uneeded code in get_proxy_setup_url.

view details

Asvin Balloo

commit sha 923e5294ef2a3b580822e06f8a8ebb0478d68948

Update font size for label.

view details

Eugene Manuilov

commit sha a35ff2293c5dbd80413fc9567c602458673c0939

Merge pull request #4395 from google/feature/4341-analytics-splash-ui Feature/4341 analytics splash UI

view details

push time in 7 days

issue commentgoogle/site-kit-wp

Replace existing useSelect calls throughout the app with useInViewSelect

Update on this issue: it turns out the useSelects that can be straightforwardly updated to useInViewSelect is a lot more narrow than originally intended. Any loading or error selector is much more sensitive to the undefined returned by useInViewSelect.

I'm working through these but it's a bit less straightforward than we hoped. There was also a problem with our useInView approach—it caused way too many updates when used across the app, so we needed to adjust it to store the 'in-view" state per widget area instead of per-hook instance to prevent a "maximum depth exceeded" re-render React error.

tofumatt

comment created time in 7 days

push eventgoogle/site-kit-wp

Ivan@Kruchkoff.com

commit sha 01f234400d9751057b9692c23a2beeed74318ba8

Update jump link.

view details

Tom Rees-Herdman

commit sha 924bb0807b79d9160a810f5de2b858f0488cdd82

Ensure widget area titles are present and correct on the Unified Dashboard.

view details

Eugene Manuilov

commit sha b19868cb43f16a4040814394c17ab2f69191f074

Update assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js

view details

Eugene Manuilov

commit sha 7291e3bcb8dfd63470cb5bb4a0eef8688349cfb9

Update assets/js/googlesitekit/widgets/register-defaults.js

view details

Eugene Manuilov

commit sha f9282d28aa895d97db4676ebab99eb9703717585

Merge pull request #4404 from google/feature/4275-setup-cta-anchor-tag Update jump link.

view details

Eugene Manuilov

commit sha a608bcba230cf33c225b33730b15204aecfad5f6

Merge pull request #4405 from google/enhancement/4340-unified-dashboard-context-titles Add title and subtitle to Widget Contexts for Unified Dashboard.

view details

Matthew Riley MacPherson (tofumatt)

commit sha 9683b8c3687350ba6134b1a484285ceb12a236e1

Merge branch 'develop' into feat/useInViewSelect-4121.

view details

push time in 7 days

PR opened google/site-kit-wp

Update useSelect calls to useInViewSelect

Summary

<!-- Please reference the issue this PR addresses. --> Addresses issue #4121.

Relevant technical choices

To reduce the manual import/changes across the repo, this exports useInViewSelect from googlesitekit-data.

Checklist

  • [ ] My code is tested and passes existing unit tests.
  • [ ] My code has an appropriate set of unit tests which all pass.
  • [ ] My code is backward-compatible with WordPress 4.7 and PHP 5.6.
  • [ ] My code follows the WordPress coding standards.
  • [ ] My code has proper inline documentation.
  • [ ] I have added a QA Brief on the issue linked above.
  • [x] I have signed the Contributor License Agreement (see https://cla.developers.google.com/).
+1272 -1214

0 comment

241 changed files

pr created time in 7 days

create barnchgoogle/site-kit-wp

branch : feat/useInViewSelect-4121

created branch time in 7 days

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha c05d7d8f59cd2d054675f588ff492a808ea5d0d9

Deploying to gh-pages - 10:04:54

view details

push time in 7 days

push eventoctopusthink/octopusthink.com

Octopus Think Robot

commit sha a648ddcdbd3389811929a7ecfe2a88b54afb7581

Deploying to gh-pages - 10:06:17

view details

push time in 8 days

push eventgoogle/site-kit-wp

Eugene Manuilov

commit sha fa55e0b2cff0f498b0ceebd3186e46860b502078

Update the idea hub survey threshold.

view details

Eugene Manuilov

commit sha 17c3ef527ad3844c06a5f0b5980ea64514996330

Revert removed tabToIndex object.

view details

Matthew Riley MacPherson

commit sha 23971f051f0e42f0f79fcd687224d198d58cfae4

Merge pull request #4391 from google/enhancement/4368-idea-hub-survey-threshold Enhancement/4368 idea hub survey threshold

view details

push time in 9 days

delete branch google/site-kit-wp

delete branch : enhancement/4368-idea-hub-survey-threshold

delete time in 9 days

PR merged google/site-kit-wp

Enhancement/4368 idea hub survey threshold cla: yes

Summary

<!-- Please reference the issue this PR addresses. --> Addresses issue #4368

Relevant technical choices

<!-- Please describe your changes. -->

Checklist

  • [ ] My code is tested and passes existing unit tests.
  • [ ] My code has an appropriate set of unit tests which all pass.
  • [ ] My code is backward-compatible with WordPress 4.7 and PHP 5.6.
  • [ ] My code follows the WordPress coding standards.
  • [ ] My code has proper inline documentation.
  • [ ] I have added a QA Brief on the issue linked above.
  • [ ] I have signed the Contributor License Agreement (see https://cla.developers.google.com/).
+1 -1

2 comments

1 changed file

eugene-manuilov

pr closed time in 9 days

more