-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into infrastructure/848…
…3-reference-date-eslint-rule.
- Loading branch information
Showing
67 changed files
with
1,356 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* Site Kit by Google, Copyright 2024 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. | ||
*/ | ||
|
||
( ( jQuery ) => { | ||
// eslint-disable-next-line no-undef | ||
if ( ! jQuery || ! Marionette || ! Backbone ) { | ||
return; | ||
} | ||
|
||
// eslint-disable-next-line no-undef | ||
const ninjaFormEventController = Marionette.Object.extend( { | ||
initialize() { | ||
this.listenTo( | ||
// eslint-disable-next-line no-undef | ||
Backbone.Radio.channel( 'forms' ), | ||
'submit:response', | ||
this.actionSubmit | ||
); | ||
}, | ||
|
||
actionSubmit( response ) { | ||
global._googlesitekit?.gtagEvent?.( 'submit_lead_form', { | ||
event_category: response.data.form_id, | ||
} ); | ||
}, | ||
} ); | ||
|
||
jQuery( document ).ready( function () { | ||
new ninjaFormEventController(); | ||
} ); | ||
} )( global.jQuery ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...s-4/components/audience-segmentation/dashboard/AudienceTile/AudienceTileCollectingData.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* AudienceTileCollectingData component. | ||
* | ||
* Site Kit by Google, Copyright 2024 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 { Fragment } from '@wordpress/element'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import AudienceTileCollectingDataImage from '../../../../../../../svg/graphics/audience-segmentation-collecting-data.svg'; | ||
|
||
export default function AudienceTileCollectingData() { | ||
return ( | ||
<Fragment> | ||
<AudienceTileCollectingDataImage className="googlesitekit-audience-segmentation-tile__zero-data-image" /> | ||
<p className="googlesitekit-audience-segmentation-tile__zero-data-description"> | ||
{ __( | ||
'Site Kit is collecting data for this group.', | ||
'google-site-kit' | ||
) } | ||
</p> | ||
</Fragment> | ||
); | ||
} |
60 changes: 60 additions & 0 deletions
60
...onents/audience-segmentation/dashboard/AudienceTile/AudienceTileCollectingDataHideable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* AudienceTileCollectingDataHideable component. | ||
* | ||
* Site Kit by Google, Copyright 2024 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. | ||
*/ | ||
|
||
/** | ||
* External dependencies | ||
*/ | ||
import PropTypes from 'prop-types'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { Fragment } from '@wordpress/element'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import Link from '../../../../../../components/Link'; | ||
import VisibilityIcon from '../../../../../../../svg/icons/visibility.svg'; | ||
|
||
export default function AudienceTileCollectingDataHideable( { onHideTile } ) { | ||
return ( | ||
<Fragment> | ||
<p className="googlesitekit-audience-segmentation-tile__zero-data-description"> | ||
{ __( | ||
'You can hide this group until data is available.', | ||
'google-site-kit' | ||
) } | ||
</p> | ||
<Link | ||
secondary | ||
linkButton | ||
className="googlesitekit-audience-segmentation-tile-hide-cta" | ||
onClick={ onHideTile } | ||
leadingIcon={ <VisibilityIcon width={ 22 } height={ 22 } /> } | ||
> | ||
{ __( 'Temporarily hide', 'google-site-kit' ) } | ||
</Link> | ||
</Fragment> | ||
); | ||
} | ||
|
||
AudienceTileCollectingDataHideable.propTypes = { | ||
onHideTile: PropTypes.func.isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.