dfinity / nns-dapp

The Dapp of the Internet Computer's Network Nervous System.
https://nns.ic0.app/
Other
112 stars 38 forks source link

Add createNeuronNeuronVisibilityRowData and isPrivateNeuron to neuron utils #5619

Closed coskucinkilic closed 2 weeks ago

coskucinkilic commented 2 weeks ago

Motivation

In bulk visibility change design, we have rows of neurons displayed. There is a similar neuron util getNeuronTags but it provides some extra data. I would like to have exact data which i will display in these rows.

I want to have a method isPrivateNeuron to verify if neurons are private !isPublicNeuron doesn't work because visibiltiy can be undefined or also Unspecified for upcoming bulk visibiltiy changes.

Changes

  1. Add createNeuronNeuronVisibilityRowData and isPrivateNeuron neuron utils
  2. create a new method getNeuronTagUnrelatedToController to reutilise part of getNeuronTags
  3. Add neuron-visibility-row type

Tests

Add tests to cover new methods in neuron.utils

Todos