-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
|
There was a problem hiding this 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!
* @param {string} bucket | ||
*/ | ||
constructor(bucket) { | ||
if (!bucket) throw new Error('bucket is required'); // TODO provide better error message. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merchDatasourceCache ?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
Includes:
On top of these, all the files in mas have been linted automatically.
imports have been re-adjusted.
Resolves: MWPW-153599
Test URLs: