package seedu.task.ui;

import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import seedu.task.commons.core.LogsCenter;
import seedu.task.commons.util.FxViewUtil;

import java.util.logging.Logger;

/**
 * Controller for a help page
 */
public class HelpWindow extends UiPart {

    private static final Logger logger = LogsCenter.getLogger(HelpWindow.class);
    private static final String ICON = "/images/help_icon.png";
    private static final String FXML = "HelpWindow.fxml";
    private static final String TITLE = "Help";
    private static final String USERGUIDE_URL = HelpWindow.class.getClassLoader().getResource("command-summary/CommandSummary.html").toExternalForm();

    private AnchorPane mainPane;

    private Stage dialogStage;

    public static HelpWindow load(Stage primaryStage) {
        logger.fine("Showing help page about the application.");
        HelpWindow helpWindow = UiPartLoader.loadUiPart(primaryStage, new HelpWindow());
        helpWindow.configure();
        return helpWindow;
    }

    @Override
    public void setNode(Node node) {
        mainPane = (AnchorPane) node;
    }

    @Override
    public String getFxmlPath() {
        return FXML;
    }

    private void configure(){
        Scene scene = new Scene(mainPane);
        //Null passed as the parent stage to make it non-modal.
        dialogStage = createDialogStage(TITLE, null, scene);
        dialogStage.setMaximized(true); //TODO: set a more appropriate initial size
        setIcon(dialogStage, ICON);

        WebView browser = new WebView();
        browser.getEngine().load(USERGUIDE_URL);
        FxViewUtil.applyAnchorBoundaryParameters(browser, 0.0, 0.0, 0.0, 0.0);
        mainPane.getChildren().add(browser);
    }

    public void show() {
        dialogStage.showAndWait();
    }
}

@@ -455,72 +455,8 @@
 s);%0A
-    private static final String ICON = %22/images/help_icon.png%22;%0A
     
@@ -557,16 +557,41 @@
 %22Help%22;%0A
+    //@@author A0153467Y%0A
     priv
@@ -614,25 +614,30 @@
  String 
-USERGUIDE
+COMMANDSUMMARY
 _URL = H
@@ -738,16 +738,30 @@
 Form();%0A
+    //@@author
 %0A    pri
@@ -1262,24 +1262,53 @@
 FXML;%0A    %7D%0A
+    %0A    //@@author A0153467Y
 %0A    private
@@ -1366,16 +1366,26 @@
 mainPane
+, 700, 600
 );%0A     
@@ -1507,128 +1507,8 @@
 ne);
-%0A        dialogStage.setMaximized(true); //TODO: set a more appropriate initial size%0A        setIcon(dialogStage, ICON);
 %0A%0A  
@@ -1583,17 +1583,22 @@
 oad(
-USERGUIDE
+COMMANDSUMMARY
 _URL
@@ -1726,24 +1726,38 @@
 ser);%0A    %7D%0A
+    //@@author
 %0A    public 

Change the size of the webpage