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

[WIP] [#1056] Implement new design for data type picker #108

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@vitorbaptista
Contributor

vitorbaptista commented Jun 8, 2017

This is still WIP only because we need to release a new version of os-types (we need the code merged on openspending/os-types#8). Other than that, it's good to go, although the performance isn't great, as there're many different data types.

@akariv Why do we add 40 unknown dimension #i to the data types on https://github.com/openspending/os-types/blob/master/src/index.js#L18-L43 ? As we're using the data to build the options, we end up getting them all. Also, I had to change the structure of os-type-descriptions.json to make it easier to build the menu (see convertOSTypesDescriptions in app/front/scripts/directives/os-datatype.js). This could be avoided if we're able to change it on os-types. Finally, there might be some methods on os-types that aren't needed anymore, like autoComplete(), but I'm not sure who uses it.

Fixes openspending/openspending#1056

[#1056] Implement new design for data type picker
Instead of using `typeahead.js`, I'm using `jquery.mmenu`, as it's the same
@smth used while designing the UI.

Fixes openspending/openspending#1056

@vitorbaptista vitorbaptista requested a review from akariv Jun 8, 2017

@akariv

This comment has been minimized.

Show comment
Hide comment
@akariv

akariv Jun 9, 2017

Contributor
Contributor

akariv commented Jun 9, 2017

@vitorbaptista

This comment has been minimized.

Show comment
Hide comment
@vitorbaptista

vitorbaptista Jun 9, 2017

Contributor

@akariv So I could then remove the autoComplete() method of os-types. What about the unknown type descriptions? If I were to change the format from the current:

{
  'activity:': {
    // ...
  },
  'activity:generic:': {
    // ...
  },
  // ... and so on
}

To the current format used in this PR:

[
  {
    key: 'activity',
    types: [
        {
          key: 'activity::generic',
          types: [],
        },
        // ...
    ],
  },
  // ...
]

Should I add the 40 unknown dimensions as well? Is this data used somewhere else? Otherwise it feels unnecessary to add these dimensions only to hide them.

Contributor

vitorbaptista commented Jun 9, 2017

@akariv So I could then remove the autoComplete() method of os-types. What about the unknown type descriptions? If I were to change the format from the current:

{
  'activity:': {
    // ...
  },
  'activity:generic:': {
    // ...
  },
  // ... and so on
}

To the current format used in this PR:

[
  {
    key: 'activity',
    types: [
        {
          key: 'activity::generic',
          types: [],
        },
        // ...
    ],
  },
  // ...
]

Should I add the 40 unknown dimensions as well? Is this data used somewhere else? Otherwise it feels unnecessary to add these dimensions only to hide them.

@akariv

This comment has been minimized.

Show comment
Hide comment
@akariv

akariv Jun 10, 2017

Contributor

Yes, there's no need for the descriptions of the 40 unknown types.

Contributor

akariv commented Jun 10, 2017

Yes, there's no need for the descriptions of the 40 unknown types.

@vitorbaptista

This comment has been minimized.

Show comment
Hide comment
@vitorbaptista

vitorbaptista Jun 12, 2017

Contributor

As we have a new design for os-packager, this PR isn't relevant anymore. Closing it unmerged 👍

Contributor

vitorbaptista commented Jun 12, 2017

As we have a new design for os-packager, this PR isn't relevant anymore. Closing it unmerged 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment