WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
389 stars 628 forks source link

Add specific page titles for views that lack them #4616

Open ragesoss opened 3 years ago

ragesoss commented 3 years ago

Current Behavior:

Some pages on the Dashboard don't have specific page titles (ie, what shows up in browser history and on the browser tab). This makes it harder to navigate through the site using browser history. Some do have specific titles, but they use 'after_titlerather thanbefore_title`.

Desired Behavior:

Every page except the main landing page should follow the same convention already in place for course pages, with a before_title string added to the standard title. For example, a user profile page should have a title like: User:Sage_(Wiki_Ed) — Wiki Education Dashboard instead of just Wiki Education Dashboard. (This particular example has already been fixed.)

Related Files & Code:

For an example of where this is already implemented, for course pages, see app/views/courses/shows.html.haml.

Browse the haml files and/or explore the app to find pages that lack a specific title or could be improved by replacing the use of after_title.

chepyego commented 3 years ago

am working on this ticket

ragesoss commented 2 years ago

Some of these, including user profile pages, have been fixed, but there are plenty of others that still don't have useful titles.

The training pages — like https://dashboard.wikiedu.org/training and https://dashboard.wikiedu.org/training/students/wikipedia-essentials and https://dashboard.wikiedu.org/training/students/wikipedia-essentials/policies-and-guidelines-basic-overview — are one area that needs good titles.

chepyego commented 2 years ago

I can add them

ragesoss commented 2 years ago

@chepyego hi! I just recommended this for another newcomer to the project. If you'd like to find something else to work on, I can look around for something. Let me know what kind of issue you're interested in.

chepyego commented 2 years ago

Okay, no problem yes I would like to work on maybe something to do with system test or any rails issue I don't have experience with react actually this was my first project doing that has React but am ready to learn and Understand the project more am back ! .my Pc had crashed just bought a new one ,it has been a while

TheTrio commented 2 years ago

For some reason, my training contents page is entirely empty.

image

I did find a training-content folder in the root of the project but I have no idea how make that show up on the website. Was this due to some configuration I missed?

Edit: Looks like the tables are empty. I had already seeded the database, but I tried running rake db:migrate again just to be sure. Unfortunately, it doesn't look like anything changed. image

ragesoss commented 2 years ago

To load training content, first set wiki_education: true in application.yml, then visit localhost:3000/reload_trainings?module=all .

ragesoss commented 2 years ago

That takes care of the server-rendered part of the training pages. A possible further improvement would be to add title handling into the React app so that titles change as you navigate through the different tabs of a course page, and through the individual slides of a training module.

Some other pages that still lack titles:

TheTrio commented 2 years ago

Yes, that should be doable.

TheTrio commented 2 years ago

through the individual slides of a training module.

Since slideTitle is already part of the component, it should be straightforward to just prepend that to the page title.

so that titles change as you navigate through the different tabs of a course page

I'm wondering what's the best way to do this. Since there is no state here (as far as I can tell, everything is being managed by React Router), I can't find a clean way to do this. We do have access to the current location though - so I could write a switch statement which sets the title depending on what tab we're on. But that doesn't seem like a very good idea - though I'm unable to think of anything better.

I suppose we could set the titles inside of the rendered components, like OverviewHandler, ActivityHandler. This would be considerably simpler. But then we have the home route, which renders the OverviewHandler as well.

So should the page title be Overview - <rest> or Home - <rest>? Or should that change depending on the URL?

saha23s commented 1 year ago

Hi @ragesoss , I am just curious if there are more pages lacking titles to work on for this issue.

ragesoss commented 1 year ago

@saha23s yes, there are a number of them. A few I found with a quick scan include all the FAQ routes, as well as the /admin index page and some of the pages linked from there.

saha23s commented 1 year ago

@ragesoss I am aiming to make the title look like this: For admin pages: Username - Programs and Events Dashboard For FAQ pages: Username - Title of FAQ - Programs and Events Dashboard Will it work?

ragesoss commented 1 year ago

@saha23s username is not relevant in most cases, including those ones.

I'd say something like 'Admin tools' is a good name for the admin, and perhaps 'FAQ: [title of FAQ] - [Dashboard title]' for the FAQ pages.

saha23s commented 1 year ago

@ragesoss I am working on a pull request for only admin pages. [ I think after working with the FAQ issue, I can update the titles of faq pages ]

ragesoss commented 1 year ago

@saha23s those are commits that you added into your branch via git merge. Check out the git.md doc for some possibly-helpful instructions are sorting that out.

saha23s commented 1 year ago

@ragesoss I have created a PR for the admin pages. Also, a suggestion is that for a couple of pages, I saw that the keyword for that page is after the default title - which basically does not help the user to distinguish between pages in the open browser tabs. I think it's better to add the keyword before the title. Just a note if anyone works on this issue as well!

HARSHITHASALADI1 commented 10 months ago

Could you please assign me this task?

fillingtothemomo commented 9 months ago

@ragesoss is this issue still active?

ragesoss commented 9 months ago

@fillingtothemomo I think so. I don't know which pages still lack titles, but I'm pretty sure there are a few.

Solobarine commented 3 weeks ago

I would like to work on this @ragesoss

Solobarine commented 3 weeks ago

@ragesoss I have added descriptive titles for some pages. Here is the pull request with the changes: [PR](https://github.com/WikiEducationFoundation/WikiEduDashboard/pull/5977)