Skip to content
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

Draft: show initial sentences of goal page #40

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sornas
Copy link
Contributor

@sornas sornas commented Jan 19, 2025

there is an API for checking the initial N sentences of a page! unfortunately CORS means we have to add an endpoint to the backend that proxies this api. i will do that soon.

@sornas sornas marked this pull request as draft January 19, 2025 15:14
<input id="goal-page-input" class="box text" placeholder="League of Legends"></input>
<div id="goal-page-container">
<button id="show-goal-text" class="button box" onclick="ToggleGoalSummary()">intro</button>
<input id="goal-page-input" class="box text" placeholder="League of Legends"></input>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something happened with the width here
image

Comment on lines +100 to +108
#goal-page-container {
display: flex;
flex-direction: row;
gap: 0.5em;
}

#goal-page-input {
flex-grow: 1;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obviously this needs to be expanded

@@ -45,7 +45,12 @@
<div class="text">Start a race from</div>
<input id="start-page-input" class="box text" placeholder="Gingerbread"></input>
<div class="text">to</div>
<input id="goal-page-input" class="box text" placeholder="League of Legends"></input>
<div id="goal-page-container">
<button id="show-goal-text" class="button box" onclick="ToggleGoalSummary()">intro</button>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the button be just un-clickable or completely hidden before the game has started?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can fix a lot of this stuff after the reef.js merge. I think it should just be disabled

@sornas sornas linked an issue Jan 19, 2025 that may be closed by this pull request
@l0f3n
Copy link
Contributor

l0f3n commented Jan 19, 2025

Honestly when I read about this feature I imagined it would be on the extension side, since not everything that is participating has actually gone to the website... 🤔 But it is certainly easier this way

@sornas
Copy link
Contributor Author

sornas commented Jan 19, 2025

maybe at some point but right now we don't even show the start and goal page in the extension so we would need to fix that first :p (but i don't think we want all that in the extension, esp. when we have "open lobby")

@l0f3n
Copy link
Contributor

l0f3n commented Jan 22, 2025

there is an API for checking the initial N sentences of a page! unfortunately CORS means we have to add an endpoint to the backend that proxies this api. i will do that soon.

the other wikipedia api calls use the origin=* parameter which seems to work, but I dont really know the consequences...

i just added a commit which does this, but feel free to implement it properly if you dont think this is good enough

@sornas
Copy link
Contributor Author

sornas commented Jan 23, 2025

the other wikipedia api calls use the origin=* parameter which seems to work, but I dont really know the consequences...

nice! that was exactly what i wanted :D

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

Successfully merging this pull request may close these issues.

show preview (e.g. first sentence) of goal article
2 participants