Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MWPW-153599: M@S Studio initial commit #22

Merged
merged 22 commits into from
Jul 8, 2024
Merged

Conversation

yesil
Copy link
Collaborator

@yesil yesil commented Jul 4, 2024

Includes:

  • studio module for M@S Studio
  • commons module for shared features such as deeplink, aem client, etc.
  • mocks folder for centralising all the mocks
  • mas module for the global entry point for the runtime
  • eslint+prettier config update

On top of these, all the files in mas have been linted automatically.
imports have been re-adjusted.

Resolves: MWPW-153599

Test URLs:

Copy link

aem-code-sync bot commented Jul 4, 2024

Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@yesil yesil mentioned this pull request Jul 8, 2024
Copy link
Collaborator

@npeltier npeltier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great to me, thanks!

studio.html Outdated Show resolved Hide resolved
studio/README.md Outdated Show resolved Hide resolved
* @param {string} bucket
*/
constructor(bucket) {
if (!bucket) throw new Error('bucket is required'); // TODO provide better error message.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can you do better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know yet :)

import { AEM } from '@adobe/mas-commons';
import { Fragment } from './Fragment.js';

let merchDataSourceCache;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merchDatasourceCache ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started with Datasource, then changed to DataSource :-/


async doSearch(props) {
this.search.update(props);
const fragments = await this.aem.sites.cf.fragments
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be we should

  • consider abstracting API from CF
  • differentiate between name "fragments" that are HTML/WC hydrated with content from what this does which is merch content? merchContent? merchItem ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the lightweight AEM api is a mini client for https://developer.adobe.com/experience-cloud/experience-manager-apis/api/stable/sites/

Since we are operating in headless mode, fragment is by nature the data and not HTML/WC.

I think "merch card" as term is good enough, e.g: I'll other a merch card in MAS Studio.

studio/src/studio.js Outdated Show resolved Hide resolved
studio/test/studio.test.html Outdated Show resolved Hide resolved
studio/test/studio.test.html.js Outdated Show resolved Hide resolved
studio/src/studio.js Show resolved Hide resolved
@yesil yesil changed the title MWPW-153599: M@S Hub initial commit MWPW-153599: M@S Studio initial commit Jul 8, 2024
@3ch023 3ch023 merged commit a0739be into adobecom:main Jul 8, 2024
5 checks passed
@yesil yesil added do not merge PR should not be merged yet and removed do not merge PR should not be merged yet labels Jul 8, 2024
rohitsahu pushed a commit that referenced this pull request Jul 9, 2024
* main:
  MWPW-153599: M@S Studio initial commit (#22)
  MWPW-153926: Attempt to fix wtr in github actions (#24)
  MWPW-153926: Attempt to fix wtr in github actions (#23)
  MWPW-147716: Renamed isIosDevice > IS_IOS (#20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants