Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

website issues #1151

Closed
58 of 61 tasks
markus2330 opened this issue Nov 30, 2016 · 75 comments
Closed
58 of 61 tasks

website issues #1151

markus2330 opened this issue Nov 30, 2016 · 75 comments
Assignees

Comments

@markus2330
Copy link
Contributor

markus2330 commented Nov 30, 2016

Frontend

  • The rest docu seems like it needs data from apiary.io to be able to display anything (which again pulls in google analytics and more).
  • If snippet import was successful, but the export to the various formats failed both "success" and "error" is shown.
  • plugin sections expandable

Questions

  • Why is a plugin required for RSS? Do you generate atom or RSS?

Archive

Frontend

  • fix snippets without author
  • create issue for privacy badger: libelektra.org screen wents black EFForg/privacybadger#1103
  • Mozilla Firefox 45.5.1: Webpage still is initially black (only at main page, others work as before, so it might be related to embedded asciinema). When scrolling down and then up, it gets white.
  • Every individual snippet exported separately in the repo
  • have asciinema delievered by main page
  • give some hints for people that do not know Elektra but want to upload a snippet: e.g. which plugins to use when uploading snippets (line if unsupported, ini for ini, not xmltool for xml,..), that some parts are unchangeable after upload..
  • search for all snippets
  • button for listing all snippets created by yourself
  • login fails with misleading error messages (connection failed)
  • have links to plugins (open in new tab) when selecting a plugin (share/convert)
  • firefox is not able to autocomplete login (user+password)
  • rename "additional plugin arguments:" + question mark explaining what happens with additional conf for plugin variants
  • add "additional plugin configuration" to "report issue on github" script
  • github button on main page
  • move rss feed to /news/feed.rss
  • link AUTHORS for "ElektraInitiative" bottom right
  • time zone for "Last update:"
  • blinking should stop when finally is there (or even remove bar, too)
  • "Examples" button should be "Tutorials" instead, the examples are not really interesting (or we only have "Getting Started"?)
  • root url http://namoshek.at:9000/ should not produce 404 but redirect to /home
  • use some other plugin per default in snippet conversion (not dump), maybe line is best
  • please add icons for the orientation, too
  • registration page: I enter first both passwords, then user, then mail, suddenly it says that second password is wrong
  • when entering: "hosts fstab system iso9600" tags get red and cannot submit tags/snippet
  • scope and organization should have defaults, description should not be enforced
  • when submitting errornous snippet, it says github button below should be pressed, but there is no such button
  • green tick in snippet window overlaps with scroll bar
  • fix rss feed button + icon
  • explain internal routing via href in readme
  • 3.2 MB application.js? (answer: it is a bundle containing all used JS dependencies, so instead of many files we only have one large one)
  • external links always in new tabs
  • avoid useless menu point for README https://community.libelektra.org/libraries/readme
  • does not work w/o javascript
  • search is annoying
  • not really clear that you can upload snippets (why is there a login?)
  • responsiveness issues
    • menu
    • margins/paddings (home page)
  • Links from all "big points"
  • build date of website added to DOM
  • Add effect when changing slogan
  • rename configure-rest-frontend to build-rest-frontend (+ adjust build script)
  • firefox does not show "subscribe" for rss
  • block-text, others are not
  • back button does not work when following links with redirect, e.g. when visiting tools.
  • show build date on web site
  • make © a link to devgettingstarted/license
  • is there an easy, non-disturbing way to have a "show page at github" link on every page? I needed this twice already.
  • line length (when there is a line wrap/new line) quite different across main page
  • login name not visible (you do not know with which name you are logged into the backend)
  • when no hits on snippet search, it should say: "No snippets found"
  • When going to a link, e.g. https://community.libelektra.org/devgettingstarted/license it is unclear where you are ("Development" should be highlighted in this case)
  • clicking on login possible even though backend is down, we should immediately say that login won't work

Backend

Other

Questions

  • how to list all snippets I have created?
  • space separated tags get automatically merged to a single tag? What is the rationale here?
  • Do we really need the news.json? Can't it be a part of structure.in?
  • Is it possible to use all html in src/tools/rest-frontend/public/assets/translations/en.json? Is it necessary/useful to use ui-sref for links?
markus2330 pushed a commit that referenced this issue Nov 30, 2016
@markus2330
Copy link
Contributor Author

I changed the text a bit. Can you modify the icon for "batteries included"?

@Namoshek
Copy link
Contributor

Can you modify the icon for "batteries included"?

Which one should I take? (see http://fontawesome.io/icons/ for a list, you can search for battery too)
I think battery-three-quarters is good (shows better that is is a bettery) or battery-full in case we want to show that we are awesome. 👍


The points where I don't write something, I'll change. Btw, can we change #1108 then?

use some other plugin per default in snippet conversion (not dump), maybe line is best

The dropdown is sorted by the plugin status, i.e. best plugin at top. Of course it can be changed, but it seems dirty...

please add icons for the orientation, too

Are you talking about the 3 points on the bottom?

registration page: I enter first both passwords, then user, then mail, suddenly it says that second password is wrong

Tried with three test input-sets, but cannot reproduce. There is also no connection between the validation of the fields actually...

when creating snippets: clicking on "?" does not do anything (for hover you need patience, please show it immediately)

Have to see what I can do. The behavior of the HTML title-attribute is browser dependend, so I have no influence there. Only solution would be to switch to a tooltip plugin, but would be nice to avoid that...

scope and organization should have defaults, description should not be enforced

Suggestions? Personally, I don't think it makes sense and that we should wait and see if it actually makes sense...

when submitting errornous snippet, it says github button below should be pressed, but there is no such button

Good point, but minor. I'd like to fix this with implementing a button that does the same as for the conversion, but other things are more urgent.

green tick in snippet window overlaps with scroll bar

Don't think I can fix that.

when submitting view-source:http://markus-raab.org/Info/Config/Elektra/filesystems.xml xml files gets accepted, but content gets discarded (selecting xmltool as plugin)? Same for line plugin and others? Main functionality seems to be broken?

Something seems broken there, will have a look.


how to list all snippets I have created?

You go to the search, press "advanced options", select "filter by" and enter your name to search for. If you think we should have a button to this list in the profile, put it on the todo list. ^^

space separated tags get automatically merged to a single tag? What is the rationale here?

Tags do not allow spaces (that's the whole purpose of tags - a single word as description).

Do we really need the news.json? Can't it be a part of structure.in?

The structure.json is an array at the highest level, so merging it with news is not going to work. But I don't understand the problem, because the news.json is only generated, but never published on its own... it is put into the JS application.

Is it possible to use all html in src/tools/rest-frontend/public/assets/translations/en.json? Is it necessary/useful to use ui-sref for links?

Yes, you can use all HTML, but the place where the key will be used has to be marked with the translate-compile directive additionally. On the one hand its a safety thingy, on the other hand I never thought we would need it for all keys.
ui-sref is only for internal links on the website - and yes, it should be used for those. If you use a normal a-tag for an internal link, it will lead to a refresh and rebootstrap of the page, which is not good. ui-sref operates on the state name by the way, not on links.

@markus2330
Copy link
Contributor Author

markus2330 commented Nov 30, 2016 via email

@Namoshek
Copy link
Contributor

Strange, I tried it twice with Firefox 45.5.0. So its a AngularJS bug?

Can't tell. But as normal people do not work against the flow of forms, its not worth to investigate in my opinion.

When clicking would do something the hover behavior wouldn't be important.

I can't force the title to show earlier, only a move towards a tooltip plugin would help.

So how does the interface work? Do I have to click to add multiple tags?

You write something, press enter, write something, press enter... yes, it is also counter-intuitive for me, as enter often forces the form to submit, but that's how the plugin works unfortunately.

Then the issue is that the file was added to the repo?

Was it? If so, yes, it is.

@markus2330
Copy link
Contributor Author

its not worth to investigate in my opinion.

Ok, its low-priority anyway.

I can't force the title to show earlier, only a move towards a tooltip plugin would help.

Ok, lets keep the issue for later then if miscategorization really happens.

Was it? If so, yes, it is.

It still is?

@Namoshek
Copy link
Contributor

Namoshek commented Dec 1, 2016

please add icons for the orientation, too

Just realized now that I omitted them intentionally. It looks crowded with so many icons and it is also very hard to find fitting ones for these points. A simple arrow (enumeration sign basically) is no problem, but I still think it looks crowded.

@markus2330
Copy link
Contributor Author

Yes, it looks a bit crowded but reducing icons seems not to be the best way to deal with it.
I still hope we can change the main page to have a multi-page experience with much more whitespace, unfortunately @waht seems to be busy at the moment.

Anyway: the button has the same number of columns as above, so it should work the same way? And I am sure you can find some nice icons ;)

Btw. do you have some ideas how we can bring icons into the the tutorials and NEWS entries to make them look nicer?

@Namoshek
Copy link
Contributor

Namoshek commented Dec 1, 2016

In the text or where exactly?

@markus2330
Copy link
Contributor Author

Yes, next to the text (e.g. on the left side). For example "Get It!" and "Stay tuned!" would look much nicer. Hopefully you will find other opportunities while writing the release notes for the homepage!

@Namoshek
Copy link
Contributor

Namoshek commented Dec 1, 2016

I doubt we can do that easily...

@markus2330
Copy link
Contributor Author

Ok, it is a minor thing, let us keep it in the backlog.

@Namoshek
Copy link
Contributor

Namoshek commented Dec 2, 2016

when submitting view-source:http://markus-raab.org/Info/Config/Elektra/filesystems.xml xml files gets accepted, but content gets discarded (selecting xmltool as plugin)?

The issue is clearly with the XML plugin. When I use absolute keys in the xml file (the ones that the snippet will have when it gets stored), everything works fine. The import with relative paths does also not work with kdb import dir/test xmltool < filesystems.xml.

I think I read somewhere something about compile-time configuration for the xml plugin with relative keys. Either we use such an option for the website or we omit the plugin entirely... doesn't make sense to work with absolute paths.

Same for line plugin and others?

This is another issue that I'll fix right away.

@markus2330
Copy link
Contributor Author

Thanks, I opened #1159 for the XML relative paths issue. Seems like this ticket is nearly finished.

Do you think it is useful now to let more people test the snippet service? I would prefer if the snippet service already runs on the new server for further tests.

@Namoshek
Copy link
Contributor

Namoshek commented Dec 2, 2016

ui-sref is only for internal links on the website - and yes, it should be used for those. If you use a normal a-tag for an internal link, it will lead to a refresh and rebootstrap of the page, which is not good. ui-sref operates on the state name by the way, not on links.

I was actually wrong about this point, you can also use href for internal links, the router will match them automatically (e.g. href="/plugins/readme" will work too instead of ui-sref="main.dyn.plugins({file:'readme'})"). I guess that is a good info for not-so-angular people.

It actually works that good that the router will give you a 404 page, even if you request something like the feed.rss file. That's why you have to add target="_self" or _blank to the link to disable the internal routing. (This requires a small patch for the rss button, which has no icon currently... for whatever reason.)

Do you think it is useful now to let more people test the snippet service? I would prefer if the snippet service already runs on the new server for further tests.

Yes, I think so, but I first want to make sure the jenkins build script works with what I installed so far. We also need a service setup for the backend as it might crash.

@markus2330
Copy link
Contributor Author

I guess that is a good info for not-so-angular people.

Yes, that are very good news! Please update the README.

even if you request something like the feed.rss file

Please also explain (in the README) what "something like" is. For which links is target="_self needed?

Yes, I think so, but I first want to make sure the jenkins build script works with what I installed so far. We also need a service setup for the backend as it might crash.

Yes, let us discuss these issues in #1161 please.

@Namoshek
Copy link
Contributor

Namoshek commented Dec 2, 2016

Please also explain (in the README) what "something like" is. For which links is target="_self needed?

Meant are non-internal links, even if they target resources on the same server. If a link is external, it obviously is routed as such. But if a link is relative or has the same base URL as the frontend as target, it would get routed internally (by the JS app, not by the browser) without target.

target="_self" targets the current browser window/tab while target="_blank" opens a new window/tab.

@Namoshek
Copy link
Contributor

Namoshek commented Dec 9, 2016

Links from all "big points"

Where should we link them to?

@Namoshek Namoshek mentioned this issue Dec 9, 2016
38 tasks
@markus2330
Copy link
Contributor Author

Where should we link them to?

Global configuration database: without link
Human readable conf files: mount tutorial
plugins/tools: to startpage of plugins/tools
batteries included: link individual points
configuration specification: validation tutorial
code generation: src/tools/gen

@Namoshek
Copy link
Contributor

Namoshek commented Dec 9, 2016

I added one or two more links than in your suggestions, see 8e7b649.

@markus2330
Copy link
Contributor Author

Thank you! Looks great with links now! There are quite some 404 now, however, e.g. storage plugins.

And it would also be nice if the logo+title would be a link, too?

@Namoshek
Copy link
Contributor

Namoshek commented Dec 9, 2016

Doesn't look good with the logo/title being a link, I tried it. That's also why I tweaked some of the suggestions a little bit.

404 are interesting, I tried all links locally. Must investigate that further...

@markus2330
Copy link
Contributor Author

That's why the message hints both possible errors, connection issue or unavailable backend... in the end it doesn't matter and you can quite easily find out what the real error is, if it is relevant for you.

How can I find out? At least for me it matters a lot: I always need to check manually if the rest-client is running.

And I think it generally of interest if retrying with different data might lead to success.

Changing it just bloats the code, there is no easy way to intercept this behavior in a central place.

It would be enough if we have it at the "public places" (login, snippet transformation).

That's what is generated and there are no options to prevent it (see apiary-client).

Seems like there is commercial interest behind this.

Btw. what are the results of API testing and benchmarking? Did you try something?

@Namoshek
Copy link
Contributor

Btw. what are the results of API testing and benchmarking? Did you try something?

I tried some testing with dredd, but forget about it, doesn't work. I'm actually not even sure what it does, but what I know for sure is that it will never be able to test our authentication stuff, so it is worthless. Didn't benchmark anything though.

@markus2330
Copy link
Contributor Author

Didn't benchmark anything though.

Would be good if you take a look. Maybe the frontend has more user-visible optimization potential. In particular I noticed that many files are not downloaded before the whole application.js is downloaded. Is there some way to prefetch things?

@markus2330
Copy link
Contributor Author

Can you take a look at http://grinder.sourceforge.net/ ?

@markus2330
Copy link
Contributor Author

I added some further usability issues:

  • search for all snippets?
  • search for own snippets?
  • give some hints which plugins to use when uploading snippets (line if unsupported, ini for ini, not xmltool for xml,..)

@markus2330
Copy link
Contributor Author

Thanks, I updated the issues that I noticed in #1221

@markus2330
Copy link
Contributor Author

@Namoshek
Copy link
Contributor

Namoshek commented Dec 21, 2016

Mozilla Firefox 45.5.1: Webpage still is initially black (only at main page, others work as before, so it might be related to embedded asciinema). When scrolling down and then up, it gets white.

Any error in the browser console?

About the black screen, maybe it is fixed when it is CSS valid:

All errors are vendor issues from fontawesome, bootstrap, etc. I highly doubt they are really invalid css. And even if, I can't change them as they are packed automatically.

As the error appeared with the move to selfhosting of asciinema, I guess the problem is related to this. It doesn't occur in firefox 45.4.0 and also not in firefox 45.6.0 btw.

why are some snippets without author?

My best guess is: crash

@Namoshek
Copy link
Contributor

I think we should remove the view counter from the snippets. It spams the repository with a commit each time someone looks at a snippet and I guess it would also speed up everything if it wasn't there.

@Namoshek Namoshek mentioned this issue Dec 21, 2016
2 tasks
@markus2330
Copy link
Contributor Author

Any error in the browser console?

[#][INFO]  State change success! ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  Main template ready ____ [application.js:14:3928] application.js:1:2750
[#][INFO]  Home controller ready ____ [application.js:14:3928] application.js:1:2750
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create asciinema-player.js:36:11097
no element found data::1:1
1482348325958	addons.productaddons	ERROR	Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https."  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145"  data: no] Log.jsm:751:0
1482348325959	Toolkit.GMP	ERROR	GMPWrapper(gmp-gmpopenh264) findUpdates() - updateTask for gmp-gmpopenh264 threw: [Exception... "SSL is required and URI scheme is not https."  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145"  data: no] Stack trace: checkCert()@resource://gre/modules/CertUtils.jsm:145 < downloadXML/</success()@resource://gre/modules/addons/ProductAddonChecker.jsm:113 Log.jsm:751:0
1482348326667	addons.update-checker	WARN	Update manifest for {972ce4c6-7e08-4474-a285-3208198ce6fd} did not contain an updates property
[#][INFO]  User service ready! ____ [application.js:14:3928] application.js:1:2750
[#][INFO]  Change state from '' ([object Object]) to 'main.home' ([object Object]) ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  From state: {"name":"","url":"^","views":null,"abstract":true} ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  To state: {"url":"/home","templateUrl":"pages/main/website/home.html","controller":"WebsiteHomeController as ctrl","ncyBreadcrumb":{"label":"APP.BREADCRUMBS.MAIN.HOME"},"name":"main.home"} ____ [application.js:17:22370] application.js:1:2750
[#][LOG]  Not authenticated ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  State change success! ____ [application.js:17:22370] application.js:1:2750
[#][INFO]  Main template ready ____ [application.js:14:3928] application.js:1:2750
[#][INFO]  Home controller ready ____ [application.js:14:3928] application.js:1:2750
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create asciinema-player.js:36:11097

As the error appeared with the move to selfhosting of asciinema, I guess the problem is related to this. It doesn't occur in firefox 45.4.0 and also not in firefox 45.6.0 btw.

The problem is caused by the privacy badger. Maybe we should report the problem there?

My best guess is: crash

How to fix this?

I think we should remove the view counter from the snippets. It spams the repository with a commit each time someone looks at a snippet and I guess it would also speed up everything if it wasn't there.

You could simply not do kdb.set, then it will be changed with the next change? (If some of the views are lost, it does not really matter).

Btw. can you restore my snippets? They were modified variants of some files, its not so easy to modify them again. Please also upload more snippets, its not so inviting to contribute if there are so few snippets.

@Namoshek
Copy link
Contributor

The problem is caused by the privacy badger. Maybe we should report the problem there?

No idea, it's your decision if you are using it. But the chances they will tell you that you are blocking scripts and stuff and that it is normal behavior is quite high.

How to fix this?

Well, I expect it to be fixed already. I'm quite sure it had to do with the high loads / sort of endless loops caused by wrong config for the simpleini plugin.

You could simply not do kdb.set, then it will be changed with the next change? (If some of the views are lost, it does not really matter).

I thought about this too, but what do we gain from the views? I think nothing... it was collect-only until now anyway. And we don't need the info in the snippet exports, so I removed it.

Btw. can you restore my snippets? They were modified variants of some files, its not so easy to modify them again.

I can try to.

@markus2330
Copy link
Contributor Author

I thought about this too, but what do we gain from the views? I think nothing... it was collect-only until now anyway.

Okay, let us reintroduce it when we actually need it for sorting or similar.

I can try to.

Thank you!

One more question: I do not understand the "Action" button in the search interface. Why not simply make the whole lines links? The problem I have with the button is that I cannot press with the middle mouse on it (to open it in a background tab)

@Namoshek
Copy link
Contributor

The button is not a link, there is the issue. It is routed by the internal router and this one actually cannot be changed because quite some data is moved between the states (more than the key which is visible in the URL).

@markus2330
Copy link
Contributor Author

I reported the issue about Privacy Badger: EFForg/privacybadger#1103

@Namoshek
Copy link
Contributor

Namoshek commented Dec 21, 2016

Ok forget about it, we have to remove the git script, it deletes data / prevents saving of data. I could also not restore some of the snippets you imported with the list plugin.

@markus2330
Copy link
Contributor Author

Ok forget about it, we have to remove the git script, it deletes data / prevents saving of data.

What do you mean? It is quite unlikely that two people upload/edit snippets at the same time. For all other cases you should avoid doing kdb.set.

I could also not restore some of the snippets you imported with the list plugin.

I did not import something with the list plugin. Do you mean line plugin? What is the issue? You also find older versions of these config files in http://markus-raab.org/Info/Config (you can upload all of them).

Btw. if someone has js disabled: You can argue that it is safe to activate js, because all of the js we use is free software and can be inspected in our repo (including how it is build). And if someone does not want to disable js: you can argue that all information is on github too (but less nice presented and without snippets functionality...).

@markus2330
Copy link
Contributor Author

we have to remove the git script

Are you sure that it is executed in the background?

E.g. kdb mount /tmp/test.ini system/shelltest ini array= shell 'execute/set=./script &'
Then it should immediately let the other process continue. (The ' are very important)

I uploaded another snippet, for me it works really nicely now! The script, however, was not in the repo afterwards?

@Namoshek
Copy link
Contributor

Namoshek commented Dec 22, 2016

kdb mount /var/lib/jenkins/snippets/snippets.dump system/configs dump shell 'execute/set=kdb update-snippet-repository &' was the used command. I changed the mountpoint (as I said), because it - for whatever reason - deleted stuff. I had it twice that it deleted something from the database while I updated other snippets, which did not happen anymore after I removed the script. Don't ask me why, it doesn't make sense to me either, but yeah.

Do you mean line plugin?

Sorry, ofc I meant the line plugin.

@markus2330
Copy link
Contributor Author

Do you mean it removed other snippets or that it prevented something from being committed?

Btw. we could also log into the snippet repo, that might be useful.

@Namoshek
Copy link
Contributor

Ok, maybe something else is broken. It again removed meta data of several snippets with a restart of the backend. 😭

@markus2330
Copy link
Contributor Author

Dont worry, we will find the issue. Btw. finish the thesis first ;)

@Namoshek
Copy link
Contributor

🤦‍♂️

ks.append (entry);
ks.append (entry.getSubkeys ());

and the subkeys (aka snippet) can contain the root key (aka entry) as well, which overrides the entry + meta keys... arbitrary plugin behavior ftw.

@Namoshek
Copy link
Contributor

Btw. it seems that some augeas lenses can indeed import stuff, but cannot export the same stuff again (e.g. tried it with the apache2 configuration and the Httpd lens). So I think this lenses are of no value for us and we should disable them to improve performance. What do you think?

Btw. I already tried on my dev VM if this behavior changes if I add the root key of the snippets to the keyset that is used during export, but it didn't change anything.

1) system/configs/this/is/an/entry   <-- root key
2) system/configs/this/is/an/entry/setting1
3) system/configs/this/is/an/entry/setting2
4) system/configs/this/is/an/entry/settings/s1
5) system/configs/this/is/an/entry/settings/s2

(neither export with 2-5, nor with 1-5 works)

@markus2330
Copy link
Contributor Author

For me hosts works really nicely: https://www.libelektra.org/entries/details/augeas~2Fhosts~2Fv1~2Flocalhost and I think it is really informative what the differences of abstractions between augeas and otherwise written parsers can be.

But yes those who definitely do not work, please disable them. But please report it to #1215 (so that @fberlakovich knows the issues) or, for non-augeas plugins to a separate issue. We have to investigate where the problem is and always should try to keep all plugins running on the website.

@Namoshek
Copy link
Contributor

Namoshek commented Dec 22, 2016

Yes, hosts works fine, but some others unfortunately not. I'll start a list of plugins + checks which we can then use to file a new issue.

@markus2330
Copy link
Contributor Author

Thank you for all the fixes! I will close this issue (consider it as fixed) #1228 are new ideas how we could continue and the leftovers from here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants