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

Ui for normalize metadata #2278

Merged
merged 25 commits into from
Mar 15, 2017
Merged

Ui for normalize metadata #2278

merged 25 commits into from
Mar 15, 2017

Conversation

marla-singer
Copy link
Contributor

@marla-singer marla-singer commented Mar 13, 2017

Closes #2185
Closes #2064
Closes #855

  • Remove Orgazanition block from Metadata tab
  • Add validation for Phone & Email field
  • Edit label (capitalize)
  • Add organization name in API page header

@marla-singer marla-singer added this to the Sprint 38 milestone Mar 13, 2017
@marla-singer
Copy link
Contributor Author

marla-singer commented Mar 13, 2017

@brylie I've done fetch organization data via collection helper. But I have an open question:

If API metadata doesn't exist and a user is connection API to an organization. What to do?

@brylie
Copy link
Contributor

brylie commented Mar 13, 2017

If API metadata doesn't exist and a user is connection API to an organization. What to do?

One idea, would be to display the related Organization somewhere on the API Profile page (e.g. in the header). That way, we can use the collection helper to retrieve the Organization document, and display the organization name.

In effect, we are fully removing the Organization from the Metadata feature/view.

@Nazarah and @bajiat, what are your thoughts? Do we have some time available to add the Organization details to the API Profile wireframe?

@marla-singer
Copy link
Contributor Author

@brylie We can leave it as Enhancement. Now I implemented it with minimal trigger actions.

@@ -24,10 +24,13 @@ ApiMetadata.schema = new SimpleSchema({
},
'contact.phone': {
type: String,
// TODO: used constant contactPhone
regEx: /^[0-9-+()/\s.]+$/,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please describe this regular expression in plain English. We are currently reviewing regular expressions, so we can provide human friendly error messages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After merging 2276 PR I will replace it to constant

// Make sure API metadata doesn't exists
if (!apiMetadata) {
// Create a new document
ApiMetadata.insert({ apiId });
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 to create a dummy document?

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets try to find a solution that doesn't create 'empty' documents.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It isn't empty. You can it perceive like a container for displaying organization information.

Copy link
Contributor

@brylie brylie Mar 13, 2017

Choose a reason for hiding this comment

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

Ah, I think I see the problem. Rather than creating an empty document, just so we can use collection helper from the API Metadata collection, simply use the existing Apis.organization() helper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm. I need to think about it. I have an idea

Copy link
Contributor

Choose a reason for hiding this comment

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

Kool. Remember to just keep it simple.

@marla-singer
Copy link
Contributor Author

@brylie If API Metadata doesn't exists, it will be look so:
joxi_screenshot_1489409738040

@marla-singer
Copy link
Contributor Author

marla-singer commented Mar 13, 2017

But we need to think up something about text "No Metadata found".
My idea is

  • If API is connected to an organization, don't display text for ordinary users and show text "No contact or service is here. You can add using button Edit metadata"
  • if API is not connected to an organization then display "No Metadata found" as before. Text must be improved

@brylie
Copy link
Contributor

brylie commented Mar 13, 2017

@marla-singer lets just see if we can move the organization details to the API Profile. That would sidestep this whole issue.

cc: @bajiat @Nazarah

@marla-singer marla-singer force-pushed the feature/ui-for-normalize-metadata branch from c15757f to 128df23 Compare March 13, 2017 13:04
@brylie brylie self-assigned this Mar 13, 2017
@Nazarah
Copy link
Contributor

Nazarah commented Mar 14, 2017

agree with @brylie about showing organization information in API profile header.
It takes one extra click for an user to find out if it has any organization associated.
When there is no connection, we can simply hide organization metadata from profile header.

@bajiat
Copy link
Contributor

bajiat commented Mar 14, 2017

I think it is ok to show organization name in the API profile header. Long term I think APIs should either be added by an organization or a person. This would mean that we could namespace the APIs with either username or organization name. This probably requires rethinking how we add APIs.

But if there are any other details in the Metadata tab for organization, I'm not sure they should be added anywhere else than Metadata. Unless you have a concrete suggestion where we would have room for more details than organization name.

If the Metadata tab contains information about organization, is it really necessary to show "No metadata found". Even though technically the remaining information comes from Metadata document, does the user care about that?

@marla-singer
Copy link
Contributor Author

@bajiat @Nazarah I need wireframe for that

@brylie
Copy link
Contributor

brylie commented Mar 14, 2017

@marla-singer I just got approval from @bajiat to simply add the organization name to the API Profile page, in a way that we see fit. We will get review from @bajiat and @Nazarah when we have a working example.

@brylie
Copy link
Contributor

brylie commented Mar 14, 2017

Here is an example wireframe:

screenshot_20170314_113026

@marla-singer
Copy link
Contributor Author

I thought so
joxi_screenshot_1489484613049

@marla-singer
Copy link
Contributor Author

@brylie @Nazarah @bajiat
joxi_screenshot_1489485352934
The image size became bigger. It was 50 px, I did 80 px

@Nazarah
Copy link
Contributor

Nazarah commented Mar 14, 2017

@marla-singer : can we reposition the star-ratings a bit down and then position Organization data there?
I am not liking the look and feel of owner and organization information coming side by side.
Two information are different and they should have different focus on user's eyes, not creating conflict in attention.

@marla-singer
Copy link
Contributor Author

The API profile header is fact-laden 😕

@Nazarah
Copy link
Contributor

Nazarah commented Mar 14, 2017

I'd like to go with the following design:

screenshot_20170314_113026

The changes that this screen needs is to have the same logo of organization that we show in navbar.
The name should be a link to the organization profile itself.
Also Star-rating should appear below organization name.

@marla-singer
Copy link
Contributor Author

joxi_screenshot_1489491009747

@marla-singer
Copy link
Contributor Author

But If API is not connected to an organization, it looks like
joxi_screenshot_1489491154567

@marla-singer
Copy link
Contributor Author

@bajiat Remove or not Organization block from Metadata tab at all?

@bajiat
Copy link
Contributor

bajiat commented Mar 15, 2017

@marla-singer Go ahead and remove organization from Metadata

@marla-singer
Copy link
Contributor Author

@brylie Ready for review

@brylie brylie merged commit e00d02a into develop Mar 15, 2017
@brylie brylie deleted the feature/ui-for-normalize-metadata branch March 15, 2017 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants