Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the "publish as" screen #1122

Merged
merged 1 commit into from Sep 12, 2017
Merged

Refactor the "publish as" screen #1122

merged 1 commit into from Sep 12, 2017

Conversation

noirbizarre
Copy link
Contributor

Try to make more user publish as their organization from the first time.

To do so, I:

  • switched the organizations before/above the current user
  • cleary separated the 2 sections
  • automaticaly select the first organization when available
  • warn/push the user to find or create an organization if he's not already member of at least one

I'm not member of any organization

screenshot-www data dev-2017-09-11-14-50-20

I'm member of one or more organization(s)

screenshot-www data dev-2017-09-11-14-55-18

Note

This PR also fixes a bug: some parts where displayed when they shouldn't.

<div class="row text-center" v-if="$root.me.organizations.length <= 0">
<p class="col-xs-12 lead">
{{ _("You are not member of any organization.") }}
{{ _("Maybe you should find or create your own.") }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find one

<a v-link.literal="/organization/new" class="btn btn-flat btn-primary">{{ _('Find or create your organization') }}</a>
<div class="row text-center" v-if="$root.me.organizations.length <= 0">
<p class="col-xs-12 lead">
{{ _("You are not member of any organization.") }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a member (I think)

<p class="col-xs-12">{{ _("Maybe you should find or create your own.") }}</p>
<div class="col-xs-12 text-center">
<a v-link.literal="/organization/new" class="btn btn-flat btn-primary">{{ _('Find or create your organization') }}</a>
<div class="row text-center" v-if="$root.me.organizations.length <= 0">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can drop the <= 0?

@@ -53,6 +59,11 @@ export default {
this.selected = null;
return true;
}
},
watch: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need that, data not enough? this.$root.me.organizations not always defined when component is loaded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sometimes, $root.me is not yet loaded when the UI is displayed (when you have a direct link to the new dataset form by example)

Try to ensure more user publish as their organization from the first
time.
@noirbizarre noirbizarre changed the base branch from dev to master September 12, 2017 15:40
@noirbizarre noirbizarre merged commit 268705b into opendatateam:master Sep 12, 2017
@noirbizarre noirbizarre modified the milestones: 1.1.7, 1.2.0 Sep 12, 2017
@noirbizarre noirbizarre deleted the ux-auto-select-org branch September 12, 2017 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants