-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Show URLS for exact redirect #3593
Conversation
readthedocs/redirects/models.py
Outdated
return redirect_text.format( | ||
type=ugettext('Prefix Redirect'), | ||
from_url=self.from_url, | ||
to_url='' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding something like the docs say?
http://docs.readthedocs.io/en/latest/user-defined-redirects.html
docs.example.com/dev/install.html -> docs.example.com/en/latest/install.html
So, maybe it could say
Prefix Redirect: /dev -> /{default_language}/{default_version}
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really good improvement! Thanks.
Take a look at my comment and let me know. This should be ready to get merged soon.
@humitos done! Probably we may want to move this representation to the template in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! It's ready to merge for me.
Can you post a screenshot of what this looks like with a long redirect path? This will wrap in a strange way. Similar to some of the other patterns that use this table layout, we should probably move some of the information to a second line of smaller text, similar to the project import page. |
@stsewd would you like to update this PR to use the style you have already used in other PRs (the one with the second line similar to import project page)? @davidfischer I agree! In this particular case, what would you write? "Create"? |
@agjohnson @humitos now I think that this styles should be more general, probably is better to do that on #3572 https://github.com/rtfd/readthedocs.org/pull/3572/files#diff-9537de04b5e187580d265c8136166aed and then applied them here. Meanwhile I'll modify the layout. |
@agjohnson @humitos this is how it would look like reusing the styles from #3572 (obviously the redirect name would no be on the urls and a icon instead of the |
I think "Create redirect" is great. "Create" is certainly better than "Submit". |
I think the 2nd line looks good overall. |
@stsewd I like your proposal! I'll use the name of the rediect (Page Redirect, Page Prefix, etc) in the first line and remove it from the second line (gray one). I think it will look nicer. Seems like everything is converging to a common style. I like that! |
@stsewd could you take a look at my last comment? I think that's the only thing missing here to get merged. Can you check if there is anything else missing? |
I refer to this comment:
So, applying this to your last example from the screenshot, it would be:
|
@humitos done, this is how it looks. Didn't like too much, but is better than before. |
Fix #2431
Now the from and to URLS are shown