#StackBounty: #angular #navigation #state #ngrx #ngrx-store Dispatch action when navigating on the same page with NgRx Router Store

Bounty: 100

I am currently building an application using NgRx and the Router Store.
There is a dropdown in one component, that changes params in the url and navigates on the same component.
Since navigating on the same component doesn’t call NgOnInit the corresponding effect (that calls the API) is not called.
In my opinion, the effect should always be called if component has changed the params.

loadTransactions$ = createEffect(() => this.actions$.pipe(
  ofType(
    NavigationActions.ActionType.NavigateToTransactionsSuccess,
    TransactionsPageActions.ActionType.LoadPage
  ),
  [...]
));

One idea I had, was to create a custom action that only listens to navigations on the component with the dropdown, but i have no idea how to do this.

My current solution is following:

this.store.select(RouterSelectors.selectUrl).subscribe(() =>
  this.store.dispatch(TransactionsPageActions.loadPage())
);

But this feels like it could cause some bugs in the future.
Is there any way to achieve this in a clean way?


Get this bounty!!!

#StackBounty: #navigation #magento2.4 #mobile-menu #mobile-device where to change responsive media breakpoint 767px in magento 2

Bounty: 100

I am working on responsive navigation menu in magento 2.4 version.
When I set width 768px in a browser it changes layout to desktop view. So I wanna keep this responsive menu design till 1024px which and where I have to change the code to achieve this ?
I changed the code from 767px to 1024px in libwebmagemenu.js and pubstaticfrontendMagentolumaen_USmagemenu.js line number 25

mediaBreakpoint: '(max-width: 1024px)'

but nothing happened. So where I have to change the code to make responsive menu till width 1024px


Get this bounty!!!

#StackBounty: #cursor-movement #filetype-markdown #navigation #plugin-vim-pandoc #plugin-vim-markdown How to move to Markdown ATX-style…

Bounty: 50

How can I move (navigate) between Markdown ATX-style headers?

The Vim plugin https://github.com/gbgar/pandoc-sections.vim does so using the [ and ] keys, but only when there is no space between the opening # hashes and the header text.

Unfortunately, above plugin is no longer maintained and the now more common space between the opening # hashes and the header text is not supported.

The solution could be as easy as forking the plugin and extending the regex’s in https://github.com/gbgar/pandoc-sections.vim/blob/master/ftplugin/pandoc/pandoc-sections.vim
However, my attempts at successfully extending the regex’s were in vain.


Get this bounty!!!

#StackBounty: #8 #i18n-l10n #navigation #migration How to translate menu items with migrate?

Bounty: 50

I’m importing menu items from CSV using migrate, migrate_tools, migrate_plus and migrate_source_csv.

This is an example of how I’m doing it:

source:
  plugin: csv
  path: 'private://init/links_gl.csv'
  delimiter: ','
  enclosure: '"'
  header_row_count: 1
  keys:
    - id
  column_names:
    0:
      id: id
    1:
      source_id: source_id
    2:
      parent_id: parent_id
    3:
      menu_name: menu_name
    4:
      weight: weight
    5:
      title: title

  constants:
    path: 'entity:node/'

ids:
  id:
    type: string

process:
  title: title
  menu_name: menu_name
  nid:
    plugin: bbaa_migration_lookup
    migration: init_contents_gl
    source: source_id
  'link/uri':
    plugin: bbaa_concat
    source:
      - constants/path
      - '@nid'
  parent:
    plugin: menu_link_parent
    source:
      - parent_id
      - '@menu_name'
  external:
    plugin: default_value
    default_value: 0
  expanded:
    plugin: default_value
    default_value: 1
  enabled:
    plugin: default_value
    default_value: 1
  langcode:
    plugin: default_value
    default_value: 'gl'
  weight: weight

destination:
  plugin: entity:menu_link_content
  bundle: menu_link_content
  no_stub: true

It’s working but now I need to import another CSV file with translated menu items.

I tried adding this code:

  id:
    plugin: migration
    source: id
    migration: init_links_gl
  content_translation_source:
    plugin: default_value
    default_value: 'gl'
  langcode:
    plugin: default_value
    default_value: 'es'

destination:
  plugin: entity:menu_link_content
  translations: true
  no_stub: true

But it doesn’t work.

How can I translate menu items with migrate?


Get this bounty!!!

#StackBounty: #navigation #ionic4 #router How to navigate back, returning some data, without knowing which page the user came from

Bounty: 50

I have a page that can be navigated to by more than one “parent/origin” page.

Something like this:

Page 1 
        
Page 2 -- Page 4
        /
Page 3 /

I need to return some data from Page 4 to it’s parent (the origin page).

I’ve been using this.navCtrl.back() to navigate back on the rest of the application, but this time I need to return some data and it seems that it is not possible using this function.

I know it is possible to pass data using this.navCtrl.navigateBack(['page-1'], extras), but I would need to know which page the user came from. Is there any easy way of doing this?

I know I can pass the name of the origin page on the extras when going to Page 4, but it doesn’t seem so correct (what is your opinion?).

Thanks in advance.


Get this bounty!!!

#StackBounty: #8 #i18n-l10n #navigation How can I have the language-specific 'enabled' Boolean of menu items being respected?

Bounty: 50

I’m trying to translate the ‘enabled’ field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file:

function MYMODULE_entity_base_field_info_alter(&$fields, DrupalCoreEntityEntityTypeInterface $entity_type) {
  if ($entity_type->id() == 'menu_link_content' && !empty($fields['enabled'])) {
    $fields['enabled']->setTranslatable(TRUE);
  }
  return $fields;
} 

This works fine and I am able to set the enabled field differently for different languages. eg: for the same menu item, I can check the ‘enabled’ field for English, but uncheck the ‘enabled’ field for French.

But it does not work as expected. It hides the menu item for all languages. Should I use hook_preprocess() or hook_preprocess_menu() or some other hook for the menu item to show/hide based on ‘enabled’ field in different languages? Can someone give me some hints on this?


Get this bounty!!!

#StackBounty: #8 #i18n-l10n #navigation How can I have the language-specific 'enabled' Boolean of menu items being respected?

Bounty: 50

I’m trying to translate the ‘enabled’ field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file:

function MYMODULE_entity_base_field_info_alter(&$fields, DrupalCoreEntityEntityTypeInterface $entity_type) {
  if ($entity_type->id() == 'menu_link_content' && !empty($fields['enabled'])) {
    $fields['enabled']->setTranslatable(TRUE);
  }
  return $fields;
} 

This works fine and I am able to set the enabled field differently for different languages. eg: for the same menu item, I can check the ‘enabled’ field for English, but uncheck the ‘enabled’ field for French.

But it does not work as expected. It hides the menu item for all languages. Should I use hook_preprocess() or hook_preprocess_menu() or some other hook for the menu item to show/hide based on ‘enabled’ field in different languages? Can someone give me some hints on this?


Get this bounty!!!

#StackBounty: #8 #i18n-l10n #navigation How can I have the language-specific 'enabled' Boolean of menu items being respected?

Bounty: 50

I’m trying to translate the ‘enabled’ field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file:

function MYMODULE_entity_base_field_info_alter(&$fields, DrupalCoreEntityEntityTypeInterface $entity_type) {
  if ($entity_type->id() == 'menu_link_content' && !empty($fields['enabled'])) {
    $fields['enabled']->setTranslatable(TRUE);
  }
  return $fields;
} 

This works fine and I am able to set the enabled field differently for different languages. eg: for the same menu item, I can check the ‘enabled’ field for English, but uncheck the ‘enabled’ field for French.

But it does not work as expected. It hides the menu item for all languages. Should I use hook_preprocess() or hook_preprocess_menu() or some other hook for the menu item to show/hide based on ‘enabled’ field in different languages? Can someone give me some hints on this?


Get this bounty!!!

#StackBounty: #8 #i18n-l10n #navigation How can I have the language-specific 'enabled' Boolean of menu items being respected?

Bounty: 50

I’m trying to translate the ‘enabled’ field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file:

function MYMODULE_entity_base_field_info_alter(&$fields, DrupalCoreEntityEntityTypeInterface $entity_type) {
  if ($entity_type->id() == 'menu_link_content' && !empty($fields['enabled'])) {
    $fields['enabled']->setTranslatable(TRUE);
  }
  return $fields;
} 

This works fine and I am able to set the enabled field differently for different languages. eg: for the same menu item, I can check the ‘enabled’ field for English, but uncheck the ‘enabled’ field for French.

But it does not work as expected. It hides the menu item for all languages. Should I use hook_preprocess() or hook_preprocess_menu() or some other hook for the menu item to show/hide based on ‘enabled’ field in different languages? Can someone give me some hints on this?


Get this bounty!!!