liferay / liferay-frontend-projects

A monorepo containing assorted Frontend Infrastructure Team projects
Other
66 stars 67 forks source link

feat(js-api): add FDS CX interfaces with `HTMLBuilder` naming convention #1157

Closed markocikos closed 10 months ago

markocikos commented 11 months ago

References

What is the goal of this PR?

In the PR, we are introducing the HTMLBuilder naming convention to public API:

We are only adding API, and not renaming, so that the existing contracts don't break. After we migrate usages in DXP, we can delete old API here.

@bryceosterhaus @izaera What do you think?

izaera commented 11 months ago

What do you think?

:ok_hand:

izaera commented 11 months ago

Only thing that came to mind after writing the :ok_hand: ...

It's not really an HTMLBuilder but an HTMLElementBuilder. I don't think it matters so much because both concepts are equivalent but if we plan to have builders that return strings (as opposed to HTMLElements) in the future it can be worth reserving the name HTMLBuilder for stuff that returns strings and use HTMLElementBuilder for this. Maybe... 🤷

bryceosterhaus commented 11 months ago

I'm pretty flexible either way, but if I had to lean one way I would say go with HTMLElementBuilder since we are explicitly expecting it to return a single HTMLElement

markocikos commented 10 months ago

Good point! I'll push the change with rename.

markocikos commented 10 months ago

@bryceosterhaus Do we need to manually publish @liferay/js-api? Any special process to do this? Looking at versions, I guess it would be 0.4.0-pre.0.

bryceosterhaus commented 10 months ago

Yep we would need to manually publish, I can do so later this afternoon or tomorrow

bryceosterhaus commented 10 months ago

@markocikos https://github.com/liferay/liferay-frontend-projects/releases/tag/js-api%2Fv0.4.0-pre.0