Anahita Project

The #Anahita #project management group. Visit https://github.com/anahitasocial for more information about Anahita code and how to get started.

Stories

Rastin Mehr

Rastin Mehr shared a note

So the media browse view with notes, photos, and topics is working in the #Anahita #ReactJS app. At this point we are feeling more confident with the data flow and #ReduxJS patterns. It is time to ... Read More
So the media browse view with notes, photos, and topics is working in the #Anahita #ReactJS app. At this point we are feeling more confident with the data flow and #ReduxJS patterns. It is time to put the focus back on the #MobileFirst design of user interfaces, because right now it is still desktop first. We also want the React containers and components to be as reusable and DRY as possible. Read Less
Rastin Mehr

Rastin Mehr commented on the Article

Anahita 4.* Roadmap

This is the list of goals that we want to accomplish for this release. The implementation details and time are generally unknown until we actually start developing them.
16 people liked this
I think using edges for the one-to-one relationships will make the architecture more consistent. I wasn't crazy about the parentable behaviour to begin with. I am waiting to see whether it becomes redundant or not. Wh... Read More
I think using edges for the one-to-one relationships will make the architecture more consistent. I wasn't crazy about the parentable behaviour to begin with. I am waiting to see whether it becomes redundant or not. Who knows, maybe one morning we'll find an empty bed with a note left by the parentable class wishing us well. Read Less
Nick Swinford

Nick Swinford commented on the Article

Anahita 4.* Roadmap

This is the list of goals that we want to accomplish for this release. The implementation details and time are generally unknown until we actually start developing them.
16 people liked this
@rastin, referring back to my earlier comments about groups having events. I read before that you were thinking about removing one to one relations from Anahita. What if parentable was refactored to be an edge and gro... Read More
@rastin, referring back to my earlier comments about groups having events. I read before that you were thinking about removing one to one relations from Anahita. What if parentable was refactored to be an edge and groups could parent an event? Like a parent and child. Read Less
Rastin Mehr

Rastin Mehr shared a note

Actor avatar and cover upload are now working in the #ReactJS app. This is as far as we go for this week's Anahita development, because we have to work on a client deadline. We'll have a 3 day hack... Read More
Actor avatar and cover upload are now working in the #ReactJS app. This is as far as we go for this week's Anahita development, because we have to work on a client deadline. We'll have a 3 day hackathon next week to continue refining the code and also start implementing media nodes. Read Less
Rastin Mehr

Rastin Mehr shared a note

I got actor avatar upload working this weekend. The container/component code is still wet though. I'll make it DRY and commit the code later this week. Same pattern can be used for the covers too.
Rastin Mehr

Rastin Mehr shared a note

Rastin Mehr

Rastin Mehr and Nick Swinford commented on the topic

Problem with Plugins

I just submitted a pull request to fix system plugins (https://github.com/anahitasocial/anahita/pull/484).

As I previous brought up here (https://www.getanahita.com/topics/163514-component-events),...

Read More

I just submitted a pull request to fix system plugins (https://github.com/anahitasocial/anahita/pull/484).

As I previous brought up here (https://www.getanahita.com/topics/163514-component-events), there's an issue with plugin events. The problems are two-fold.

The first one is easy enough to fix. None of the plugin events are happening early enough in the process cycle; atleast for my use cases. This is why behaviors aren't being added and aliases aren't being created. By the time onAfterDispatch has fired, every things already completed. To solve this, I created a new event, onBeforeDispatch and added it at the begging of ComApplicationDispatcher::_actionDispatch and voila, it works.

The truly ideal solution for this in my mind would be a new event called onAfterInitialise that fires as soon as all the necessary files and classes are included and instantiated. I tried adding this to the end of ComApplicationDispatcher::_initialize, but that caused an error so I'm not sure where the best place would be.

The second issue is more complicated. It looks like @Rastin already ran into this issue and tried to fix it here (https://github.com/anahitasocial/anahita/commit/adecc919c326be5c2c32659036c0c264dd07a034#diff-2166c1b5fe691e3551993bc46ec87330R68).

When the storage plugin is loaded via the system plugin, it calls LibPluginsHelper::import, loads all the plugins from the database, then iterates over all of them. When it finishes, it goes back to finish the first iteration of $this->_plugins for system plugins, but the array pointer is already at the end and finishes. No plugins after plgSystemAnahita get loaded.

It looks like this was attempted to be fixed by removing KService::get('plg:storage.default') from plgSystemAnahtia, but when $this->_viewer is set to the current viewer in plgSystemAnahita (https://github.com/anahitasocial/anahita/blob/master/src/plugins/system/anahita.php#L51), the effect is the same. The actor entity is created, then the storable behavior is loaded which triggers the importing of the storage plugin.

By moving $this->_viewer into the dispatch event, it takes it out of the import cycle and it allows all the system plugins to be loaded.

Read Less
Much appreciated, I'll take a look!
@rastin, I've updated the topic with an explination. Hopefully you can understand me. 😜
Nick Swinford

Nick Swinford started a topic

Problem with Plugins

I just submitted a pull request to fix system plugins (https://github.com/anahitasocial/anahita/pull/484).

As I previous brought up here (https://www.getanahita.com/topics/163514-component-events),...

Read More

I just submitted a pull request to fix system plugins (https://github.com/anahitasocial/anahita/pull/484).

As I previous brought up here (https://www.getanahita.com/topics/163514-component-events), there's an issue with plugin events. The problems are two-fold.

The first one is easy enough to fix. None of the plugin events are happening early enough in the process cycle; atleast for my use cases. This is why behaviors aren't being added and aliases aren't being created. By the time onAfterDispatch has fired, every things already completed. To solve this, I created a new event, onBeforeDispatch and added it at the begging of ComApplicationDispatcher::_actionDispatch and voila, it works.

The truly ideal solution for this in my mind would be a new event called onAfterInitialise that fires as soon as all the necessary files and classes are included and instantiated. I tried adding this to the end of ComApplicationDispatcher::_initialize, but that caused an error so I'm not sure where the best place would be.

The second issue is more complicated. It looks like @Rastin already ran into this issue and tried to fix it here (https://github.com/anahitasocial/anahita/commit/adecc919c326be5c2c32659036c0c264dd07a034#diff-2166c1b5fe691e3551993bc46ec87330R68).

When the storage plugin is loaded via the system plugin, it calls LibPluginsHelper::import, loads all the plugins from the database, then iterates over all of them. When it finishes, it goes back to finish the first iteration of $this->_plugins for system plugins, but the array pointer is already at the end and finishes. No plugins after plgSystemAnahita get loaded.

It looks like this was attempted to be fixed by removing KService::get('plg:storage.default') from plgSystemAnahtia, but when $this->_viewer is set to the current viewer in plgSystemAnahita (https://github.com/anahitasocial/anahita/blob/master/src/plugins/system/anahita.php#L51), the effect is the same. The actor entity is created, then the storable behavior is loaded which triggers the importing of the storage plugin.

By moving $this->_viewer into the dispatch event, it takes it out of the import cycle and it allows all the system plugins to be loaded.

Read Less
Rastin Mehr liked this
Rastin Mehr

Rastin Mehr shared a note

Today's focus is experimenting with smarter ways of handling form field verification and handling in our React App
Dave Friend

Dave Friend and Rastin Mehr commented on the note

I am not impressed with the current state of caching libraries in Anahita. I am also avoiding the temptation to build new Caching libraries for Anahita at this point, because the goal of 4.3 releas... Read More
I am not impressed with the current state of caching libraries in Anahita. I am also avoiding the temptation to build new Caching libraries for Anahita at this point, because the goal of 4.3 release is to get rid of all Joomla legacy code. I am also going to drop support for APC since it is not well supported in later releases of PHP. As it is, we can get decent performance boost with php7 and OPcache on Nginx. I'm talking near double speed. Until later that we can write custom caching code for Anahita entities and objects where required. #NoJoomla #Caching Read Less
Dave Friend
Dave Friend
April 18 2018 Permalink
I notice that at https://github.com/anahitasocial/anahita/blob/master/README.md#system-requirements

Item 4 states
...with OPcache and APCU.

Both?
Rastin Mehr
Rastin Mehr
April 18 2018 Permalink
Yes, they each used different mechanisms for caching and you can benefit from both.
Rajkumar Mundel

Rajkumar Mundel commented on the Article

Anahita 4.* Roadmap

This is the list of goals that we want to accomplish for this release. The implementation details and time are generally unknown until we actually start developing them.
16 people liked this
@rastin Yes Kind of but Same like we have Email Signup Process, same way MOBILE signup process...

1. Person can signup with Mobile Number
2. If mobile, person will verify the number with OTP and will able to use ... Read More
@rastin Yes Kind of but Same like we have Email Signup Process, same way MOBILE signup process...

1. Person can signup with Mobile Number
2. If mobile, person will verify the number with OTP and will able to use the application

I asked because this helps to remove the fraud people from the platform. Read Less
Rastin Mehr

Rastin Mehr and Nick Swinford commented on the topic

Emoji in name causes infinite redirects

This isn't a really critical #bug, but I thought I should go ahead and report it.

A few months ago, I thought it'd look cool to put an #emoji at the end of my name so I did it. After that, anytime I...

Read More

This isn't a really critical #bug, but I thought I should go ahead and report it.

A few months ago, I thought it'd look cool to put an #emoji at the end of my name so I did it. After that, anytime I tried to login to my Anahita based site, I was redirected infinitely until the browser would return a too many redirects error.

The only way I could fix this was to go into the database and remove the emoji from my person node's title. After that, I was able to login perfectly well.

No idea why this happened or what caused it, whether it's an Anahita issue or maybe an apache issue, but I couldn't login for a couple weeks while I racked my brain trying to figure out what was causing the problem. If this happened to an end user, they'd have no way to fix it.

Read Less
Rastin Mehr
Rastin Mehr
April 10 2018 Permalink
Is it emoji in name or username?
In the name. I added it to the end of my last name. Basically my name was "Nick Swinford 💖".
Rastin Mehr
Rastin Mehr
April 10 2018 Permalink
This is strange, because name isn't used anywhere in the verification or alias. I am curious to find out.
Nick Swinford

Nick Swinford started a topic

Emoji in name causes infinite redirects

This isn't a really critical #bug, but I thought I should go ahead and report it.

A few months ago, I thought it'd look cool to put an #emoji at the end of my name so I did it. After that, anytime I...

Read More

This isn't a really critical #bug, but I thought I should go ahead and report it.

A few months ago, I thought it'd look cool to put an #emoji at the end of my name so I did it. After that, anytime I tried to login to my Anahita based site, I was redirected infinitely until the browser would return a too many redirects error.

The only way I could fix this was to go into the database and remove the emoji from my person node's title. After that, I was able to login perfectly well.

No idea why this happened or what caused it, whether it's an Anahita issue or maybe an apache issue, but I couldn't login for a couple weeks while I racked my brain trying to figure out what was causing the problem. If this happened to an end user, they'd have no way to fix it.

Read Less
Rastin Mehr liked this
Rastin Mehr

Rastin Mehr shared a note

We've reached a milestone with the Anahita React app. All the basic People and Actors operations are working now. These are the BREAD operations as well as follow/unfollow, block/unblock, login, lo... Read More
We've reached a milestone with the Anahita React app. All the basic People and Actors operations are working now. These are the BREAD operations as well as follow/unfollow, block/unblock, login, logout, signup, and password reset. This took a while, because we had to research and experiment with different design patterns. This sets the path for the upcoming features. The code is still wet. For example actions can be more DRY and I'm still thinking of ways to make the components more reusable. Next would be operations that require file upload for avatars and cover. Also the other actor settings such as privacy, apps, etc. There are REST APIs missing for those which need to be implemented. You can see the React App codebase here and star it if you can just to give it some traction: https://github.com/anahitasocial/anahita-react #Anahita #ReactJS #ReduxJS #MaterialUI Read Less
2 people liked this
Rastin Mehr

Rastin Mehr shared a note

We had good progress this weekend and we think we can reach our milestone of having the basic actor and person operations in place within few days. Stay tuned later this week. #Anahita #Hackathon
Rajkumar Mundel liked this
James Imani

James Imani commented on the photo

James Imani liked this
James Imani
James Imani
March 28 2018 Permalink
I am impressed.
Rastin Mehr

Rastin Mehr shared a photo

Implementing Actor's settings. For now it is only the actors info until all the people's basic operations are done. The idea is to come up with all the design patterns that we need for data and actions. Building user interfaces in #MaterialUi is quite fun.
James Imani liked this
Rastin Mehr

Rastin Mehr and Rajkumar Mundel commented on the Article

Anahita 4.* Roadmap

This is the list of goals that we want to accomplish for this release. The implementation details and time are generally unknown until we actually start developing them.
@rastin Any plans for introduce MOBILE NUMBER Based SignUP / SignIN ?
Rastin Mehr
Rastin Mehr
March 25 2018 Permalink
@rmundel are you talking about 2 step verification?
Rastin Mehr

Rastin Mehr shared a note

So now we have actor profile covers with propper loaders. Also made the code more reusable by creating generic actor and action containers https://github.com/anahitasocial/anahita-react/tree/master... Read More
So now we have actor profile covers with propper loaders. Also made the code more reusable by creating generic actor and action containers https://github.com/anahitasocial/anahita-react/tree/master/src/containers the biggest challenge with developing the React app for Anahita is finding the best design patterns. The trick is to avoid the temptation of premature optimization and let the patterns emerge first. I think we can make good use of React HOCs from this point. They are like Anahita behaviours. #Anahita #Hackathon #ReactJS #ReduxJS #MaterialUI Read Less
Rastin Mehr

Rastin Mehr commented on the topic

Undefined class constant 'SPECIAL'

I'm getting the following error:

1: Undefined class constant 'SPECIAL' in \vendor\anahita\anahita\src\libraries\default\base\domain\behavior\privatable.php on line 312

As you can see here (https://gi...

Read More

I'm getting the following error:

1: Undefined class constant 'SPECIAL' in \vendor\anahita\anahita\src\libraries\default\base\domain\behavior\privatable.php on line 312

As you can see here (https://github.com/anahitasocial/anahita/blob/master/src/libraries/default/base/domain/behavior/privatable.php#L312), the SPECIAL constant is still being used even though it was removed sometime ago.

Should the entire if statement just be removed?

Read Less
Rastin Mehr liked this
Rastin Mehr
Rastin Mehr
February 22 2018 Permalink
Good find, yes it should be removed. Could you please do a PR?

Photos View All

Articles View All

Topics View All

To-dos View All

Powered by Anahita