Porting Apostrophe-Events #3462
Replies: 6 comments 3 replies
-
Thank you for volunteering to work on this!
We've talked about this internally and we'd like to see it go forward as an
official community supported module that is under the `@apostrophecms`
namespace, like the core modules. That means what we'll do is create the
initial repo as public so that you can start work through PRs, which we
would review in the same manner we do for our own PRs on Apostrophe
contributions.
Here are some answers to your initial questions:
* moment.js: use dayjs, as we do in the core.
* async (the old npm module): you shouldn't need this anymore. A3 is based
on the async/await pattern.
* lodash: on the server side, there's nothing wrong with using it, after
all A3 core still uses it. However it makes sense not to use it for things
that modern JavaScript (node 12 or better) can do natively just as easily.
Also, for deep cloning of objects we have standardized on "klona" rather
than "_.cloneDeep".
* Regarding front-end stuff, the A2 version is pretty spare on the front
end already, so I think we should keep at least that much as guidance.
* I would keep it a bundle so that we can provide an
`@apostrophecms/piece-page-type` subclass module that handles browsing in all the
ways the old one can, as that's a core part of what makes this module a
smarter choice than starting from scratch in each project. It is true that
pieces widgets work differently in A3, so I would simplify the widget to
just be able to show a user-specified number of upcoming events.
* One of the biggest wins in the original module is the logic to handle
queries for upcoming events, current events, etc. These are handled in
lib/cursor.js and they are important to port. In 3.x cursors are called
"queries" and cursor filters, like "upcoming", are called "query builders",
and they have a section of their own in the new module format. This is an
area where I expect you might have follow-up questions for us.
I've sent you a github invite to contribute to the new repo. You can start
by pushing up the A2 code so you can begin working on a migration. It's a
good idea to specify that the project is unfinished and not ready for use
at the top of README.md.
…On Wed, Sep 29, 2021 at 11:06 AM egonzalezg9 ***@***.***> wrote:
I'm considering porting over apostrophe-events, but I want to touch base
with the core team before choosing to do it. What would be the right way to
approach it?
A few considerations or questions:
- lodash, async, and moment.js are all key dependencies that aren't in
A3 and shouldn't be (from what I understand). What alternatives would be ok?
- There's also considerations on how much front-end stuff to manage
(showing only upcoming events, etc.).
- Finally, should the focus be on the piece type and let users create
the widget/pages modules as they want them?
Just having the apostrophe-events piece type and remove any front-end
considerations may be an option, but I'm not sure if that's the right path.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3462>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAH27KVPS34GTYHLAHVGM3UEMTPNANCNFSM5FADWGIA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER
APOSTROPHECMS | apostrophecms.com | he/him/his
|
Beta Was this translation helpful? Give feedback.
-
This is the new repo if others are interested in following or contributing: https://github.com/apostrophecms/event |
Beta Was this translation helpful? Give feedback.
-
Hey @boutell, thank you for the thorough response! It's exciting to support this community module. I think the cursor/queries part may be the trickiest but there's still time before we get to that point. @bulldoguk do you want to push the code you have so far? Since you already started working on it, maybe it makes more sense to use that as the starting point. |
Beta Was this translation helpful? Give feedback.
-
I can also push a copy of our module template to that repo if it would help. |
Beta Was this translation helpful? Give feedback.
-
Yes please Alex - I've been working on this as a custom module so far - if
you have a standard template then I can pull that and start copying what
I've done into that.
Looking forward to working on this with y'all!
Gary Bailey
480-433-7046
LinkedIn profile <https://www.linkedin.com/in/garybaileytx/>
https://calendar.x.ai/garybailey-896 <https://calendly.com/baileyg>
…On Fri, Oct 1, 2021 at 1:10 PM Alex Bea ***@***.***> wrote:
I can also push a copy of our module template to that repo if it would
help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3462 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANXCLZIDVO7JIK4YJ25BH6TUEX2QTANCNFSM5FADWGIA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
Hi Gary, What I've already done is create an empty "apostrophecms/event" github repo. So you should be able to fork that and add your work, as a starting point to the old apostrophe-events module we've been talking about above, and push up a pull request like you would with any other PR. Let me know if you hit any snag at all with that. My assumption is that you've been going for a straight port, changing A2 idioms to A3, which is what we've been discussing so far. |
Beta Was this translation helpful? Give feedback.
-
I'm considering porting over apostrophe-events, but I want to touch base with the core team before choosing to do it. What would be the right way to approach it?
A few considerations or questions:
Just having the apostrophe-events piece type and remove any front-end considerations may be an option, but I'm not sure if that's the right path.
Beta Was this translation helpful? Give feedback.
All reactions