Skip to content

Commit

Permalink
Remove all support of the built-in help system
Browse files Browse the repository at this point in the history
The support of the built-in help accessible from spokes and hubs of all user
interfaces is removed. The `help_directory` Anaconda configuration option is
deprecated and removed. The `anaconda-user-help` package will be deprecated
and removed.

Anaconda will aim to make user interfaces self-descriptive and encourage users
to use the official documentation of specific Linux distributions available
on-line.

Additional notes:

* The Fedora built-in help content was outdated. Last change of the content
  happened six years ago (see the `anaconda-user-help` repository) and there
  is no process for keeping the help content up to date.

* The RHEL built-in help content was generated from the official on-line
  installation guide. However, the release process of this content wasn't
  always straightforward and there were issues with the scripts that generated
  this content.

* The built-in help content was displayed by the `yelp` tool. This tool was
  a common source of bugs, so it is desirable to drop this dependency.
  • Loading branch information
poncovka committed Nov 20, 2023
1 parent 45645d8 commit ccc7749
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 775 deletions.
3 changes: 0 additions & 3 deletions anaconda.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{vers
%define fcoeutilsver 1.0.12-3.20100323git
%define gettextver 0.19.8
%define gtk3ver 3.22.17
%define helpver 26.2-1
%define isomd5sumver 1.0.10
%define langtablever 0.0.60
%define libarchivever 3.0.4
Expand Down Expand Up @@ -283,8 +282,6 @@ Requires: nm-connection-editor
%ifnarch s390 s390x
Requires: NetworkManager-wifi
%endif
Requires: anaconda-user-help >= %{helpver}
Requires: yelp
%if ! 0%{?rhel}
Requires: blivet-gui-runtime >= %{blivetguiver}
%endif
Expand Down
3 changes: 0 additions & 3 deletions data/anaconda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,6 @@ reformat_blocklist = /home /usr/local /opt /var/www
# The path to a custom stylesheet.
custom_stylesheet =

# The path to a directory with help files.
help_directory = /usr/share/anaconda/help

# A list of spokes to hide in UI.
# FIXME: Use other identification then names of the spokes.
hidden_spokes =
Expand Down
1 change: 0 additions & 1 deletion data/profile.d/fedora.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ default_scheme = BTRFS
btrfs_compression = zstd:1

[User Interface]
help_directory = /usr/share/anaconda/help/fedora
custom_stylesheet = /usr/share/anaconda/pixmaps/fedora.css

[Payload]
Expand Down
1 change: 0 additions & 1 deletion data/profile.d/ovirt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ req_partition_sizes =
/boot 1 GiB

[User Interface]
help_directory = /usr/share/anaconda/help/rhel
hidden_spokes = UserSpoke

[Payload]
Expand Down
1 change: 0 additions & 1 deletion data/profile.d/rhel.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ default_partitioning =
swap_is_recommended = True

[User Interface]
help_directory = /usr/share/anaconda/help/rhel
custom_stylesheet = /usr/share/anaconda/pixmaps/redhat.css

[License]
Expand Down
1 change: 0 additions & 1 deletion data/profile.d/rhvh.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ req_partition_sizes =
/boot 1 GiB

[User Interface]
help_directory = /usr/share/anaconda/help/rhel
hidden_spokes = UserSpoke

[Payload]
Expand Down
15 changes: 15 additions & 0 deletions docs/release-notes/remove-help-support.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:Type: User interfaces
:Summary: Remove all support of the built-in help system

:Description:
The support of the built-in help accessible from spokes and hubs of all user interfaces
is removed. The ``help_directory`` Anaconda configuration option is deprecated and removed.
The ``anaconda-user-help`` package will be deprecated and removed.

Anaconda will aim to make user interfaces self-descriptive and encourage users to use the
official documentation of specific Linux distributions available on-line.

:Links:
- https://docs.fedoraproject.org/en-US/fedora/latest/getting-started/
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/
- https://src.fedoraproject.org/rpms/anaconda-user-help/
5 changes: 0 additions & 5 deletions pyanaconda/core/configuration/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ def custom_stylesheet(self):
"""The path to a custom stylesheet."""
return self._get_option("custom_stylesheet", str)

@property
def help_directory(self):
"""The path to a directory with help files."""
return self._get_option("help_directory", str)

@property
def hidden_spokes(self):
"""A list of spokes to hide in UI.
Expand Down
38 changes: 0 additions & 38 deletions pyanaconda/ui/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
from pyanaconda.core.async_utils import async_action_wait
from pyanaconda.ui.gui.utils import watch_children, unwatch_children
from pyanaconda.ui.gui.helpers import autoinstall_stopped
from pyanaconda.ui.lib.help import show_graphical_help_for_screen
import os.path

from pyanaconda.anaconda_loggers import get_module_logger
Expand Down Expand Up @@ -105,10 +104,6 @@ class GUIObject(common.UIObject):
that use GUI elements (Hubs & Spokes) from Anaconda
can override the translation domain with their own,
so that their subclasses are properly translated.
helpFile -- The location of the yelp-compatible help file for the
given GUI object. The default value of "" indicates
that the object has not specific help file assigned
and the default help file should be used.
"""
builderObjects = []
mainWidgetName = None
Expand Down Expand Up @@ -353,8 +348,6 @@ def __init__(self, fullscreen=False, decorated=False):

# Help button mnemonics handling
self._mnemonic_signal = None
# we have a sensible initial value, just in case
self._saved_help_button_label = _("Help!")

# Apply the initial language attributes
self._language = None
Expand All @@ -379,20 +372,6 @@ def _on_overlay_get_child_position(self, overlay_container, overlayed_widget, al
# Return False to indicate that the child allocation is not yet set
return False

def _on_mnemonics_visible_changed(self, window, property_type, obj):
# mnemonics display has been activated or deactivated,
# add or remove the F1 mnemonics display from the help button
help_button = obj.window.get_help_button()
if window.props.mnemonics_visible:
# save current label
old_label = help_button.get_label()
self._saved_help_button_label = old_label
# add the (F1) "mnemonics" to the help button
help_button.set_label("%s (F1)" % old_label)
else:
# restore the old label
help_button.set_label(self._saved_help_button_label)

def _on_child_added(self, widget, user_data):
# If this is GtkLabel, apply the language attribute
if isinstance(widget, Gtk.Label):
Expand Down Expand Up @@ -434,17 +413,6 @@ def _setVisibleChild(self, child):
child.window.add_accelerator("button-clicked", self._accel_group,
Gdk.KEY_F12, 0, 0)

# Configure the help button
child.window.add_accelerator("help-button-clicked", self._accel_group,
Gdk.KEY_F1, 0, 0)
child.window.add_accelerator("help-button-clicked", self._accel_group,
Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK, 0)

# Connect to mnemonics-visible to add the (F1) mnemonic to the button label
if self._mnemonic_signal:
self.disconnect(self._mnemonic_signal)
self._mnemonic_signal = self.connect("notify::mnemonics-visible", self._on_mnemonics_visible_changed, child)

self._stack.set_visible_child(child.window)

if child.focusWidgetName:
Expand Down Expand Up @@ -699,7 +667,6 @@ def _instantiateAction(self, actionClass):

# Use connect_after so classes can add actions before we change screens
obj.window.connect_after("continue-clicked", self._on_continue_clicked)
obj.window.connect_after("help-button-clicked", self._on_help_clicked, obj)
obj.window.connect_after("quit-clicked", self._on_quit_clicked)

return obj
Expand Down Expand Up @@ -907,11 +874,6 @@ def _on_continue_clicked(self, window, user_data=None):
self._currentAction = nextAction
self._actions.pop(0)

def _on_help_clicked(self, window, obj):
# the help button has been clicked, start the yelp viewer with
# content for the current screen
show_graphical_help_for_screen(obj.get_screen_id())

def _on_quit_clicked(self, win, userData=None):
if not win.get_quit_button():
return
Expand Down
9 changes: 0 additions & 9 deletions pyanaconda/ui/gui/spokes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from pyanaconda.ui import common
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.lib.help import show_graphical_help_for_screen

from pyanaconda.anaconda_loggers import get_module_logger
log = get_module_logger(__name__)
Expand Down Expand Up @@ -56,17 +55,9 @@ def __init__(self, data, storage, payload):
GUIObject.__init__(self, data)
common.NormalSpoke.__init__(self, storage, payload)

# Add a help handler
self.window.connect_after("help-button-clicked", self._on_help_clicked)

# warning message
self._current_warning_message = ""

def _on_help_clicked(self, window):
# the help button has been clicked, start the yelp viewer with
# content for the current spoke
show_graphical_help_for_screen(self.get_screen_id())

def on_back_clicked(self, button):
# Notify the hub that we're finished.
# The hub will be the current-action of the main window.
Expand Down
Loading

0 comments on commit ccc7749

Please sign in to comment.