Skip to content

Commit

Permalink
v1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddavo committed Jun 3, 2024
1 parent 98f1816 commit 2da3683
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

# 1.3.3 - 2024-06-03
- Updated dao-scripts to 1.4.6
- Changed some network names
- Updated dependencies

# 1.3.1 - 2024-05-27
- Updated dao-scripts to 1.3.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from dao_analyzer.web.apps.common.business.transfers.organization.organization import Organization

from dao_analyzer.web.apps.common.resources.strings import TEXT
from dao_analyzer.web.apps.common.resources.strings import TEXT, NETWORKS

class Filter(metaclass=abc.ABCMeta):

Expand Down Expand Up @@ -126,7 +126,7 @@ def __init__(self, a: Union[NetworkFilters, List[str]], network_value: str = ALL
if isinstance(a, NetworkFilters):
self._options = a.get_options()
else:
self._options = { n:n.capitalize() for n in a }
self._options = { n:NETWORKS.get(n, n.capitalize()) for n in a }

if len(self._options) > 1:
self._options = ALL_NETWORKS_DICT() | dict(sorted(self._options.items(), key=self.sorted_key))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from dao_analyzer.web.apps.common.business.transfers.organization.platform import Platform

from dao_analyzer.web.apps.common.resources import colors as COLOR
from dao_analyzer.web.apps.common.resources.strings import TEXT
from dao_analyzer.web.apps.common.resources.strings import TEXT, NETWORKS
from dao_analyzer.web.apps.common.presentation.main_view.main_view import REL_PATH

__ECOSYSTEM_SELECTED: Dict[str, List[str]] = {
Expand Down Expand Up @@ -120,7 +120,7 @@ def __generate_header(
className = 'checklist-filter',
id='org-network-radio'),
], className='header-selector-wrapper'),
className='col-3 d-flex justify-content-center'),
className='col-4 d-flex justify-content-center'),
# 3. DAO selector (and filtering)
html.Div(
html.Div(children=[
Expand Down Expand Up @@ -174,15 +174,15 @@ def _get_platform_info(p: Platform) -> dac.PlatformInfo:

return dac.PlatformInfo(
name=p.name,
networks=p.networks,
networks=[ NETWORKS[n] for n in p.networks ],
creation_date=_aux_crdatetime(p.creation_date),
participation_stats=_gen_participation_stats(p.participation_stats)
)

def _get_dao_info(org: Organization) -> dac.DAOInfo:
return dac.DAOInfo(
name=org.get_name(),
network=org.get_network(),
network=NETWORKS[org.get_network()],
address=org.get_id(),
creation_date=_aux_crdatetime(org.get_creation_date()),
first_activity=_aux_crdatetime(org.get_first_activity()),
Expand Down
10 changes: 10 additions & 0 deletions dao_analyzer/web/apps/common/resources/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@
'url_daostack': 'daostack',
'url_daohaus': 'daohaus',
}

NETWORKS: dict[str, str] = {
'__all_networks': TEXT['radio_button_all_networks'],
'arbitrum': 'Arbitrum One',
'arbitrum-one': 'Arbitrum One',
'xdai': 'Gnosis (xdai)',
'mainnet': 'Ethereum Mainnet',
'matic': 'Matic (polygon)',
'polygon': 'Polygon (matic)',
}
6 changes: 5 additions & 1 deletion dao_analyzer/web/assets/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ a {
#org-network-radio {
display: grid;
grid-auto-flow: column;
column-gap: 2em;
column-gap: 1em;
grid-template-rows: repeat(3, 1fr);
}

Expand Down Expand Up @@ -426,6 +426,10 @@ a {
display: block;
}

input[type="radio"], input[type="checkbox"] {
margin-right: .7em;
}

/*********************/
/*********************/

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ classifiers =
# packages and package_dir in setup.py
python_requires = >= 3.9
install_requires =
dao-scripts == 1.3.1
dao-scripts == 1.4.6
# Waiting for plotly/dash#2251 to be fixed
# dash >= 2.5.0, <2.6.0
dash >= 2.17.0
Expand Down

0 comments on commit 2da3683

Please sign in to comment.