chop-dbhi / cilantro

Official client for Harvest (http://harvest.research.chop.edu)
http://cilantro.harvest.io
Other
28 stars 8 forks source link

Welcome message only adapts when query/discover page is loaded directly #753

Open bruth opened 9 years ago

bruth commented 9 years ago

It appears to be working due to this line, but if it's navigated to after the fact, the change event does not fire (until the context is changed). The onRender method should be implemented that calls renderWelcomeMessage to ensure it's displays after the context has loaded.

bruth commented 9 years ago

The implementation assumes that having one filter applied denotes an existing user. However if the filters are cleared the message reverts to the "new user" message which makes this method not reliable.

Ideally, the API would provide an endpoint that provides information about the session including:

For non-authenticated users, the session start time could be used to determine whether the "new user" method should be shown. If authenticated, the join date and last login time could be used to toggle the message.

Until session-based information is available there is not a reliable fix for this.