Closed umar8hassan closed 1 month ago
@ibrahimjaved12 Could you review this?
The changes are working as expected. And I see that you also updated tests, and removed a lot outdated code.
However, I think we may be able to use some more cleanup.
When I search
external
within the codebase, there are some places whereexternal links
is still mentioned (I don't mean within context of external resources).We should use this opportunity to update it also. Also it appears a few management commands are currently also using
external URL
.For example, these are a few files:
ocw-studio/websites/management/commands/markdown_cleaning/rules/validate_urls.py
ocw-studio/websites/management/commands/markdown_cleaning/rules/broken_link_fix.py
ocw-studio/websites/constants.py
-EXTERNAL_IDENTIFIER_PREFIX = "external-"
- is this used anywhere?Also there is
isExternalLinkId
which seems to be used a lot in the codebase.We should remove
external link
related stuff wherever possible, make sure it does not break the management commands. And updateinternal link
related variables' names for their better clarity now.Just search through
external
andinternal
in the codebase for cleanup. More thorough cleanup would depend on priority, but we should do at least what we can here.
@ibrahimjaved12 I have checked through a lot of code. external
mostly shows up in management commands like nav_item_to_external_resource
which is used to convert an obsolete type of external link
to new type of external resource
. This should be kept as we might need it in case some external links needs to be converted in production
There shouldn't be any breaking change as far as I can see. However, removing the suggested commands or constants will take a lot of effort alone with updating/removing the relevant tests. I shall track this in a separate issue and prioritize if need be.
@pdpinch what's your take on this? ⬆️
@pdpinch what's your take on this? ⬆️
Sorry I haven't had a chance to comment until now. I appreciate @ibrahimjaved12's zeal for removing code, but I also don't want to hold up this change too long. We should remove the UI as soon as reasonably possible in order to avoid course authors being tempted to use it and creating more data we need to migrate.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/4101
Description (What does it do?)
It removes the Item type radio button in
Menu Item Form
.How can this be tested?
Login to
cow-studio
Add a new site course or use and existing one
In the course setting, visit page for
Menu
Add a new menu item or open an existing one
The item form should not have radio button as shown in the above picture in description