decred / politeiagui

ISC License
62 stars 56 forks source link

[cms] Politeia remnants #1196

Open xaur opened 5 years ago

xaur commented 5 years ago
crypto-rizzo commented 5 years ago

Working on this

crypto-rizzo commented 5 years ago

Just to let you know, a few of these are not possible / applicable at the moment. The /user/resend route is no longer in CMS. In addition, the no JS page will be a tough fix as well. Without server-side rendering, we can only have one HTML file, which is why the no-JS page still talks about Politeia

xaur commented 5 years ago

Why can't CMS have its own no-JS page?

crypto-rizzo commented 5 years ago

Not sure how familiar you are with React, but only one entry point HTML file can be used by default. There are plugins such as webpack which allow code splitting (and thus multiple HTML files), but this is not currently configured in our setup. I'll look into it more, but it's a pretty big change for something as simple as adding a no-JS page

xaur commented 5 years ago

Thanks for explaining.

Since we have 2 web apps in one repo, I imagine there must be a way to replace some assets for the CMS during build time. Or a hack like have a different path for the cms' no-JS page (e.g. redirect to /nojs while politeia serves it at /). Just throwing ideas, obviously I'm not into React or pigui situation.

From a user view it's clearly a bug, although a minor one.

crypto-rizzo commented 5 years ago

No problem. I'm doing some more looking into it, but there are ways to adjust the index.html at build time based on .env configuration. Depending on the scope of this addition, it might be its own PR though. I'll keep you updated.

To clarify, this is the updated task list for politeia remnants. I've checked off the ones which have already been completed and or no longer applicable.

  • [*] Text about verification link contains "Politeia" (/user/resend)
  • [*] Browser tab title is "Politeia"
  • [ ] Politeia logo is used in top left corner
  • [ ] Politeia rotating loading indicator
  • [ ] Identity file download is named "politeia-pki.json"
  • [ ] No js page has text about "Politeia" and "proposals" and links related to Politeia
  • [ ] Account/General: "Manage identity" text talks about "Politeia" and "proposals"
xaur commented 5 years ago

You might be able to edit issue description (including checking the boxes) if you have enough perms.

tiagoalvesdulce commented 4 years ago

More info about how to tackle this issue:

The copies for both politeia and cms should be moved to files inside src/apps/assets/copies, these files should be .md or.txt and an appropriate key should be created in the config files for both apps (src/apps/) and referenced in the code with the useConfig hook.