Skip to content

Commit

Permalink
Merge branch 'Simon-Initiative:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dtiwarATS committed Sep 10, 2024
2 parents 79584ec + 004595a commit 26262c5
Show file tree
Hide file tree
Showing 15 changed files with 562 additions and 57 deletions.
2 changes: 1 addition & 1 deletion assets/src/components/editing/editor/paste/onHtmlPaste.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type PartialTagDeserializer = {
action: DeserializerAction;
};

const isJest = typeof process !== 'undefined' && process.env.JEST_WORKER_ID !== undefined;
const isJest = typeof process !== 'undefined' && process.env?.JEST_WORKER_ID !== undefined;
const DEBUG_OUTPUT = !isJest;

export const filterNullModelElements = (arr: DeserializeTypes): arr is DeserializeTypesNoNull =>
Expand Down
12 changes: 10 additions & 2 deletions assets/styles/delivery/activity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@
margin-right: 3px;
}
}

// override tailwind table styles to ensure table borders and text are
// legible against colored feedback background and no dark mode change
table,
th,
tr,
td {
color: var(--color-feedback-table-color);
border-color: var(--color-feedback-table-color);
}
}
}

Expand Down Expand Up @@ -162,8 +172,6 @@
/* MER-2961 - Some wide content (specifically formulas) were getting cut off in hints, making it scrollable
*/
overflow-x: auto;


}

p:last-of-type {
Expand Down
1 change: 1 addition & 0 deletions assets/tailwind.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ module.exports = {
'feedback-partially-correct-bg': colors.yellow['200'],
'feedback-partially-correct-color': colors.black,
'feedback-partially-correct-graphic-color': colors.yellow['500'],
'feedback-table-color': colors.black,
toolbar: {
bg: {
DEFAULT: '#f8f9fb',
Expand Down
8 changes: 6 additions & 2 deletions lib/oli/delivery/previous_next_index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ defmodule Oli.Delivery.PreviousNextIndex do
alias Oli.Delivery.Sections
alias Oli.Publishing.DeliveryResolver
alias Oli.Delivery.Hierarchy
alias Oli.Resources.Numbering
alias Oli.Repo

@doc """
Expand Down Expand Up @@ -127,8 +128,11 @@ defmodule Oli.Delivery.PreviousNextIndex do
"""
def rebuild(%Section{slug: slug} = section) do
case Repo.transaction(fn _ ->
DeliveryResolver.full_hierarchy(slug)
|> Hierarchy.build_navigation_link_map()
{new_hierarchy, _} =
DeliveryResolver.full_hierarchy(slug)
|> Numbering.renumber_hierarchy()

Hierarchy.build_navigation_link_map(new_hierarchy)
|> then(fn previous_next_index ->
Sections.update_section(section, %{previous_next_index: previous_next_index})
end)
Expand Down
4 changes: 2 additions & 2 deletions lib/oli/delivery/sections.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ defmodule Oli.Delivery.Sections do
# determine and return the list of page resource ids that are not reachable from that
# hierarchy, taking into account links from pages to other pages and the 'relates_to'
# relationship between pages.
defp determine_unreachable_pages(publication_ids, hierarchy_ids) do
def determine_unreachable_pages(publication_ids, hierarchy_ids) do
# Start with all pages
unreachable =
Oli.Publishing.all_page_resource_ids(publication_ids)
Expand Down Expand Up @@ -3593,7 +3593,7 @@ defmodule Oli.Delivery.Sections do
# For a given section resource, clean the children attribute to ensure that:
# 1. Any nil records are removed
# 2. All non-nil sr id references map to a non-deleted revision in the new pub
defp clean_children(section_resource, sr_id_to_resource_id, new_published_resources_map) do
def clean_children(section_resource, sr_id_to_resource_id, new_published_resources_map) do
updated_children =
section_resource.children
|> Enum.filter(fn child_id -> !is_nil(child_id) end)
Expand Down
Loading

0 comments on commit 26262c5

Please sign in to comment.