These are chat archives for reactioncommerce/reaction

23rd
Feb 2015
Bogi
@boboci9
Feb 23 2015 18:43
Hi Aaron, is there anything that I can add in a package's register file if I want to specify that it should be available for every user?
ReactionCore.registerPackage({
name: 'bogi:elt-accountprofile',
autoEnable: true,
priority: '3',
registry: [
{
provides: 'widget',
template: 'newcoMyAccount',
route: 'newcoMyAccount',
label: 'Account',
description: 'Profile management for the user',
icon: 'fa fa-user'
},
{
provides: 'console',
route: "newcoMyAccount",
label: 'Account'
}
]
});
Aaron Judd
@aaronjudd
Feb 23 2015 19:16
autoEnable: true should enable it, so it won’t get filtered
otherwise (registry) should be available to every user
Bogi
@boboci9
Feb 23 2015 19:17
if I create a new user with reaction create account (the user has no roles yet) nothing appears in the dropdown for the user
Aaron Judd
@aaronjudd
Feb 23 2015 19:20

in accounts/dropdown/dropdown.html

<template name="userAccountsDropdown">
  <!--user account shortcut icons -->
  <span data-i18n="accountsUI.signedIn">You are signed in.</span>

</template>

You can see we don’t load anything (as I’ve not yet built, or gotten a PR, for anything to load for the user dashboard ;-) )

so you can replace that using Template.yourUserAccountDropdown.replaces "userAccountsDropdown"
Bogi
@boboci9
Feb 23 2015 19:23
Ok, sorry I am confused than because I can see my Account link with my admin user
Screenshot from 2015-02-23 21:21:43.png
Aaron Judd
@aaronjudd
Feb 23 2015 19:24
what I am trying to get at, is that there isn't a registered "provides" helper in use right now for the userAccountsDropdown
Bogi
@boboci9
Feb 23 2015 19:25
it appeared right after I added my package for the first time, but now even if I remove my package this Account link remains there with the wrong link
ok I understand
Aaron Judd
@aaronjudd
Feb 23 2015 19:27
it needs to have:
<template name="userAccountsDropdown">
  <!--user account shortcut icons -->
  <span data-i18n="accountsUI.signedIn">You are signed in.</span>
      {{#each reactionApps provides='userAccountDropdown' enabled=true}}
         <!-- templating for the user account dropdowns icons -->
      {{/each}}
</template>
ah, and if you aren't seeing it change when you update the package...
do a meteor reset between changes
Bogi
@boboci9
Feb 23 2015 19:28
ok, that could be the reason why I see the link here even if I remove my package
Aaron Judd
@aaronjudd
Feb 23 2015 19:29
exactly, so if you added it the first time and it showed in the admin, and then you changed to show as a "userDropdown" you won't see it in the userPortion yet (without extending the template)
and without a reset it won't go away
Bogi
@boboci9
Feb 23 2015 19:29
ok thanks, I will try it right away
Aaron Judd
@aaronjudd
Feb 23 2015 19:29
the only time the code changes those settings right now is if there is a 'reset' or if you 'remove/add' a package
Bogi
@boboci9
Feb 23 2015 19:30
I tried add/remove package but the Account link would still remain in the admin dropdown
Aaron Judd
@aaronjudd
Feb 23 2015 19:31
only if there is a registry entry with provides='shortcut' will anything show there (for admin)
Aaron Judd
@aaronjudd
Feb 23 2015 19:37
actually there is another case where the remove/add doesn't quite work right I think @evliu reported this. I do the add and remove while the server is running. If you stop meteor, remove, add, start -> that's not going to work. I have to think about how to handle that. I remove/add while server is running.
This message was deleted
sorry the gitter client is behaving really weird for me right now
Bogi
@boboci9
Feb 23 2015 19:41
yes it started acting strange for me as well
Aaron Judd
@aaronjudd
Feb 23 2015 19:43
well, slightly edited and garbled, but I hope you understood what I was trying to say, lol
Bogi
@boboci9
Feb 23 2015 19:45
Yes I understood but my package still won't show up :( I am debugging spacebars.coffee now to see where get's my package lost
I have both "shortcut" and "userAccountDropdown" in the array now for the registry and I changed the userAccountDropdown template
Aaron Judd
@aaronjudd
Feb 23 2015 19:47
in spacebars.coffee take a look at ‘reactionApps’ then, it should returning your registry entry there
Bogi
@boboci9
Feb 23 2015 19:51
:) I had to manually delete my package from the packages collection after the meteor remove and then it took the new settings
Aaron Judd
@aaronjudd
Feb 23 2015 19:51
:thumbsup:
Bogi
@boboci9
Feb 23 2015 19:58
should I push this userAccountsDropdown template changes to pull request or you are planning to have it there for the next version anyways?
Aaron Judd
@aaronjudd
Feb 23 2015 19:59
I was going to add it, but I’m on something else right this second so if you wanted to PR it, I’d merge it right away
(no problem if you don’t I’ll add it pretty quickly)
Bogi
@boboci9
Feb 23 2015 20:01
ok, I can add it as well, just making sure I don't add any console logs remaining after a lot of debugging :)