VITAS changed the topic of #spacedock to: Problems?: https://github.com/KSP-SpaceDock/SpaceDock/issues | Matrix/Riot Chat: https://im.52k.de +spacedock:52k.de Feel free to ask for help, we only bite a little bit! | If you want to help, please check https://github.com/KSP-SpaceDock/SpaceDock-Backend/issues/5 :) | <VITAS> inet users have the attentionspan of a squirrel...
HebaruSan[m] has joined #spacedock
<HebaruSan[m]> I think I just reset your review status if you want to try again
<RockyTV> does the mod changelog accept markdown?
<RockyTV> I think emails should be kept as plain-text
<DasSkelett[m]> Yes, mod changelog supports markdown:
<DasSkelett[m]> {{ v.changelog | markdown }}
<DasSkelett[m]> Yes, mod changelog supports markdown:
<DasSkelett[m]> `{{ v.changelog | markdown }}`
<RockyTV> I commented there on the issue but if we already displayed raw markdown on emails then it should be fine
<DasSkelett[m]> Yes, `send_update_notification()` doesn't do anything regarding markdown, it also simply passes it through.
<RockyTV> > In case you are trying to perfect your English, modal is usually used as an adjective, as in "a modal form" or "a modal popup" or "a modal dialog".
<RockyTV> I just say "popup dialog" 😛
<HebaruSan[m]> Yeah but is it modal??
<DasSkelett[m]> Me too. But somehow in the code you can only find "modal", and I never heard that before. Thought this would be one of these super modern web-dev concepts or something.
<HebaruSan[m]> In WinForms, it means that you can't access any of the app's other windows while the modal window is open
<RockyTV> > In user interface design for computer applications, a modal window is a graphical control element subordinate to an application's main window.
<HebaruSan[m]> > ... It creates a mode that disables the main window but keeps it visible, with the modal window as a child window in front of it. Users must interact with the modal window before they can return to the parent application.
<HebaruSan[m]> So if your app has several windows and you can use all of them at the same time, they're not modal
<DasSkelett[m]> I wouldn't really call "must interact with the modal window before they can return to the parent application." subordinate, but okay
<RockyTV> I'm finally reading some stuff about Vue so I can mess around with it :P
<DasSkelett[m]> Hmm.. if you paginate server-side, you obviously can't search through the items client-side anymore :/
<RockyTV> what do you mean?
<RockyTV> we already do server side pagination, don't we?
<DasSkelett[m]> Depends. Not on the Admin Stuff page, that's the reason why it doesn't work.
<DasSkelett[m]> There's a list of all users, paginated on the client, and it kills the browser on production.
<RockyTV> oof
<HebaruSan[m]> What about moving that logic to a separate page? How often do admins need to look at that list?
<RockyTV> I was going to suggest it, we can add a new route for listing users
<RockyTV> should be easy enough
<DasSkelett[m]> Yes that way you would be at least able to access the other stuff. And that's also what I did on my branch. But it doesn't fix the user list itself.
<RockyTV> link to branch?
<DasSkelett[m]> I don't think I pushed it yet, and just turned of my computer. You'll have to wait until tomorrow 😴
<RockyTV> :(
RockyTV[m] has joined #spacedock
<RockyTV> uhm the discord bridge keeps timing out
<RockyTV> I'm using Bulma btw, chose it because it uses flexbox. I just need to remember how KerbalStuff looked like so I can tweak the layouts :P
<RockyTV[m]> made the navbar full width
<RockyTV[m]> footer (need to figure out how to add some space between the icons)
DasSkelett[m] has quit [Network ban]
HebaruSan[m] has quit [Network ban]
HebaruSan[m] has joined #spacedock
VITAS[m] has joined #spacedock
<VITAS[m]> i dont want kerbal stuffs design back
<VITAS[m]> i said that allready
<VITAS[m]> its about cleaning up and standardizing the frontend code
<VITAS[m]> not redisgning the sites optical appearance
<VITAS[m]> the site uses bootstrap i dont want to move away from that
<VITAS[m]> but we could revive the dark mode :)
RockyTV[m] has quit [Quit: Idle timeout reached: 10800s]
HebaruSan[m] has quit [Quit: Idle timeout reached: 10800s]
VITAS[m] has quit [Quit: Idle timeout reached: 10800s]
DasSkelett[m] has joined #spacedock
DasSkelett[m] has quit [Quit: Idle timeout reached: 10800s]
<RockyTV> what is your idea for the mod page? we don't have to follow KS style
VITAS[m] has joined #spacedock
<VITAS[m]> as it is now
<VITAS[m]> but the code should be cleaner
<VITAS[m]> and use bootstrap as syle (and not overwrite it every step of the way)
<VITAS[m]> we can do stuff like dark mode or even other themes once the templates are cleaned up
DasSkelett[m] has joined #spacedock
<DasSkelett[m]> Who needs server-side dark mode whe nyou can have client-side dark mode 😛
<DasSkelett[m]> Also <span class="d-mention d-user">RockyTV</span> if you still want to check the branch: https://github.com/DasSkelett/SpaceDock/tree/fix/admin-page
<DasSkelett[m]> I'm force-pushing every now and then.
<DasSkelett[m]> It looks like I got the server-side pagination and search working. I'm doing the same now for the other pages like "Publishers", "Games" and "Game Versions" to keep it consistent.
<VITAS[m]> because its a gesture
<DasSkelett[m]> *edit:* ~~Who needs server-side dark mode whe nyou can have client-side dark mode 😛~~ -> Who needs server-side dark mode when you can have client-side dark mode 😛
<RockyTV> > and not overwrite it every step of the way)
<RockyTV> what do you mean?
<VITAS[m]> i would say lazy but what do i know
<VITAS[m]> isnt there docu?
<RockyTV> why use func.tolower?
<DasSkelett[m]> Can't find anything mentioning general lazy loading (or specifically regarding the .limit() function), only lazy loading of relationships.
<RockyTV> well according to the docs it adds a LIMIT to the query and according to PostgreSQL:
<RockyTV> If a limit count is given, no more than that many rows will be returned (but possibly less, if the query itself yields less rows). LIMIT ALL is the same as omitting the LIMIT clause.
<DasSkelett[m]> > why use func.tolower?
<DasSkelett[m]> @irc_RockyTV#0000
<DasSkelett[m]> To make the search case-insenstitive.
<RockyTV> can't you use "".tolower()?
<RockyTV> also: If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned.
<DasSkelett[m]> Well that doesn't answer the question if the .limit() is added to the initial query if I call it on the returnd object from and ouside function.
<DasSkelett[m]> > also: If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned.
<DasSkelett[m]> Yes I know that.
<RockyTV> try printing both queries and compare
<RockyTV> str(search_users())
<DasSkelett[m]> > can't you use "".tolower()?
<DasSkelett[m]> No, because all the comparison operators are overloaded, it's not Python comparing the strings, it's SQL/the database.
<DasSkelett[m]> > try printing both queries and compare
<DasSkelett[m]> Well if it is indeed lazily loaded, as soon as I'd print the query response, it would be executed. So it's hard to test it like this. But maybe I can watch the database logs (if there are any) and see what it does.
<RockyTV> just do a test with .limit and check the string or the logs
<DasSkelett[m]> Got postgres to log the queries after tinkering with the log files, looks like it does indeed lazy-load and respects a `.limit(10)` in an outer function.
<DasSkelett[m]> Got postgres to log the queries after tinkering with the config file, looks like it does indeed lazy-load and respects a `.limit(10)` in an outer function.
<VITAS[m]> yay
<VITAS[m]> :)
<RockyTV> does SD have cors enabled?
<RockyTV> got it to work, :P I'm feeding live SD data to my vue/nuxt experiment
<VITAS[m]> if you want to build a frontend in vue that looks like the one we have im all for it but keep in mind: you have to finish it this time :)
<DasSkelett[m]> Speaking of "finishing", I think finished the admin pages
<RockyTV> VITAS[m], I'll see what I can do, just experimenting with it right now :P
RockyTV[m] has joined #spacedock
<VITAS[m]> i like vue
<VITAS[m]> ant vuetify or what its name was
<RockyTV[m]> nuxt makes things much easier
<VITAS[m]> and also keep in mind: document your code. others can help you if you do :D
<VITAS[m]> i would still preffer the bootstrap cleanup because thats a doable thing
<RockyTV[m]> now it renders mod description properly
<RockyTV> I don't like the buttons being down there...
<RockyTV> VITAS[m], vuetify is material design for vue :P
<VITAS[m]> yes
<VITAS[m]> ive a 80% done rewrite of SD in vue.js vuetify and laravel
<VITAS[m]> ah and vuex
<RockyTV[m]> need to figure out a way to keep the info box centered but not changing the padding between items, and a way to reduce the background size
<DasSkelett[m]> And to render markdown 😛
<VITAS[m]> RockyTV is known for starting big rewrite projects that fizzle out over time
<RockyTV[m]> that's not wrong
<VITAS[m]> thats why im sceptical and would go for a lower aim
<RockyTV[m]> though I have nothing to do and this is being fun atm so who knows
<VITAS[m]> yes and thats how i see it for noe
<VITAS[m]> now
<DasSkelett[m]> If you want, I've got some JaveScript for yout that's not working...
<VITAS[m]> i find it a bit of a shame you put so much work into it
<VITAS[m]> DasSkelett could use your help as he just said :)
<RockyTV[m]> what's up?
<DasSkelett[m]> The JavaScript on the rewritten admin page(s) needs to be adjusted.
<DasSkelett[m]> To be precise, it's the code for the dropdown boxes for adding a new game / game version. It's throwing an exception I can't get anything useful from.
<RockyTV[m]> what's the error?
<DasSkelett[m]> And some relevant code:
<RockyTV[m]> what happens when you click the link referring to <anonym>?
<DasSkelett[m]> The error message is of course useless thanks to minifyed JS
<DasSkelett[m]> This is opened in the debugger
<DasSkelett[m]> If I understand it correctly, it fails somewhere in editor.js, but I have no idea where this editor.js comes from. Can't find any CoffeScript source or something
<RockyTV[m]> did you change any of the coffeescript files?
<DasSkelett[m]> Nope
<RockyTV[m]> it's this script
<RockyTV[m]> I don't think that's preventing the dropdown from working?
<DasSkelett[m]> Let me re-check if I really pass all parameters to the template
<DasSkelett[m]> Oh dear, that was one typo and one missed parameter. Dropdown works now, the error is still there though (and it isn't on alpha, I checked)
<VITAS[m]> dreamteam: one backend and one frontend dev
<VITAS[m]> :)
<DasSkelett[m]> Okay, submitting games and game versions works too. I guess I'll just ignore the error then 🤷‍♂️
<DasSkelett[m]> Thanks for the help <span class="d-mention d-user">RockyTV</span>
<DasSkelett[m]> hehe yes
<VITAS[m]> oportunities arise
<DasSkelett[m]> I'm writing the PR for the admin area now.
<DasSkelett[m]> Since I only changed a very single line (which is a changed redirect) outside of the admin-area-specific code, we could even fast track this safely to production, if you want <span class="d-mention d-user">VITAS</span>
<RockyTV[m]> I'm trying to get a custom component to work in vue
<RockyTV[m]> got it
<VITAS[m]> im for updating everything in bulk when im able to migrate prod to ubuntu 20
<VITAS[m]> the only thing i would roll out imidiatly on prod are hotfixes to showstopper bugs
<VITAS[m]> everything else should be tested on alpha and then by the public on beta
<RockyTV[m]> I think nuxt docs are outdated. it says that if you add a `pages/foo/_bar.vue` file, it will create a route with `bar` param as optional, if you want it to be required you'd need to create `pages/foo/bar/index.vue`, however that's exactly the opposite of what's going on here
<VITAS[m]> i dont want to have those upsi moments from the last update
<DasSkelett[m]> Yeah, not immediatly of course, but maybe sooner than in a 3/4 year.
<VITAS[m]> im talking a month max 2
<DasSkelett[m]> okay
<VITAS[m]> depens on the time we need to be sure everything is tested
<DasSkelett[m]> Oh nice, just saw that we are exactly at 1100 commits on the alpha branch.
<RockyTV> pagination is a pain
<RockyTV> VITAS[m], you know css right?
VITAS[m] has quit [Quit: Idle timeout reached: 10800s]
<RockyTV> DasSkelett[m], we already have /api/mod/<id>/latest, won't be hard to add the endpoint to download the latest version
DasSkelett[m] has quit [Quit: Idle timeout reached: 10800s]