-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate KSelect’s dropdown being displayed above the input in some cases even when there is enough space below #690
Comments
Hey @MisRob I was planning to work on this issue , so I was trying to reproduce the 1st img coach->plan->lesson but when I signed up in Kolibri I was signed up as a learner, could you please help me here. 😓 |
Hi @Sahil-Sinha-11 this could be that you are signing in with a learner account you created instead. You need to create a admin or coach account and log in |
Hey @AllanOXDi during creation of an account I dont see an option to make a profile as a coach, I am automatically assigned Learner. |
@Sahil-Sinha-11 When setting up Kolibri, you created admin account in the setup wizard I assume? Can you use the admin account to login? That should make this place accessible. |
@Sahil-Sinha-11 Also note there's more ways to setup Kolibri, some of them not having Coach features. I recommend you use "Group learning" -> "Full Device". More here https://kolibri.readthedocs.io/en/latest/install/initial_setup.html?highlight=setup#group-learning. Let us know if this helps. If you can't still access Coach, please post the recording or a list of steps you did. |
@Sahil-Sinha-11 I've just noticed we forgot to make an assignment - should we do so? |
No worries, absolutely no pressure! Thank you. Good luck with exams :) |
Hey @MisRob, how do I produce this locally? Is it in the kolibri ? I analysed the Kselect file and the calculations seemed fine when I logged the data, I want to analysis this as well for further understanding. |
Hi @Sahil-Sinha-11, yes, this would be best reproduced and investigated in Kolibri in some places since it seems to be specific to them. One of them is mentioned in the "Summary". Let us know if you found some of them. |
Hello @MisRob, I am not able to run the kolibri locally, I tried to use docker but on the port mapping it said "empty", I attempted to follow the guidelines in kolibri but I got overwhelmed, would you please help me, I am sorry for the trouble 😓. |
Hi @Sahil-Sinha-11. You need to use the In the root of the kolibri project, run the following commands in sequential order
|
Thanks a lot, @akolson, it worked. |
https://github.com/user-attachments/assets/63d48c0f-43ce-4dd2-803c-2d1171e8501d I Investigated some places in Kolibri I think the problem is that when the component is just below kselect it's not able to calculate the maxDropdownHeight correctly but if there is a kind of row space it works fine |
Hi @Sahil-Sinha-11, thank you for investigating! To confirm I can understand, from the recording it seems that in this particular place the dropdown is position correctly only when we remove top margin 24px from the container, right? That could give us hint. Next steps could be to debug step by step |
Hey @MisRob, when I make changes it does not reflect on the local host for example can you please help me here? |
Hi @Sahil-Sinha-11, how do you run your Kolibri development server? Are you following https://kolibri-dev.readthedocs.io/en/develop/getting_started.html#running-the-server? |
Hey @MisRob I was using make docker-devserver... I just followed the steps again and it works now, Thank you. |
Hey @MisRob, I did some investigations,
Could you please guide me on how to proceed here? I would really appreciate your assistance. |
Thanks you @Sahil-Sinha-11, I think these are all new and valuable insights. Unfortunately I have no idea myself on how to best proceed :) |
@Sahil-Sinha-11 This seems like the only area I could be of help. Would you please elaborate a bit and reference some logging code, for example in a working branch, so I can understand better what was the issue? |
@MisRob I tried like this but on the console, it says it cannot read properties of null |
@MisRob a temporary solution might be that we set bottom as auto for now, but that wouldn't be a good solution 😅. |
I think I'd need to see this in a commit to get a full picture. Perhaps you've already tried some of these, just some ideas I got:
Yes, that may not be ideal because we'd lose auto-adjusting if we did this KDS side. However, if we don't find a reasonable fix, we may actually consider overriding from Kolibri at those few particular places if it feels important. Thanks for the idea!
Of course! Thanks a lot for digging into this, it's a nuanced one. I hope you find some fun restful issue now :-) |
🌱 Are you new to the codebase? Welcome! Please see the contributing guidelines.
Summary
When there is enough space,
KSelect
's dropdown should be displayed below the input. However, there are several places in Kolibri where the dropdown is displayed above the input, even though there's enough space below. One example from Kolibri 0.17.0a0.dev0+git.123.g5cd1f6aa:Coach → Plan → Lessons
This issue is present in other selects in Plan and Reports.
Interestingly, in a very similar place in Facility → Users, it works as expected:
The main culprit seems to be the
bottom
positioning set to62px
on.ui-select-dropdown
. After commenting it out, the dropdown shows correctly in the Coach:The
bottom
value is calculated in thecalculateSpaceBelow
method:kolibri-design-system/lib/KSelect/index.vue
Lines 878 to 893 in 0cbdf57
The goal of this issue is to find out why exactly the calculation doesn't work well for places in the Coach (or check whether it’s overwritten from somewhere else, even though that’s rather unlikely). After we know more, we can determine the next steps and see if the calculation can be optimized.
References
Originally reported in learningequality/kolibri#12079 (not related to the refactor being tested there - the bug was present before).
The text was updated successfully, but these errors were encountered: